mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-15 04:14:24 +00:00
Convert to array before using sort_by!
This commit is contained in:
@@ -127,7 +127,7 @@ module Spree
|
||||
|
||||
def load_hubs
|
||||
# rubocop:disable Style/TernaryParentheses
|
||||
@hubs = Enterprise.managed_by(spree_current_user).is_distributor.sort_by! do |d|
|
||||
@hubs = Enterprise.managed_by(spree_current_user).is_distributor.to_a.sort_by! do |d|
|
||||
[(@payment_method.has_distributor? d) ? 0 : 1, d.name]
|
||||
end
|
||||
# rubocop:enable Style/TernaryParentheses
|
||||
|
||||
Reference in New Issue
Block a user