Move scoper to method

This commit is contained in:
Matt-Yorkley
2019-09-27 01:52:45 +01:00
parent 5b27ed6b9f
commit fe0b3172c7

View File

@@ -31,7 +31,6 @@ module OpenFoodNetwork
def load_products
return unless @order_cycle
scoper = ScopeProductToHub.new(@distributor)
OrderCycleDistributedProducts.new(@order_cycle, @distributor).
relation.
@@ -42,6 +41,10 @@ module OpenFoodNetwork
end
end
def scoper
ScopeProductToHub.new(@distributor)
end
def taxon_order
if @distributor.preferred_shopfront_taxon_order.present?
@distributor