Merge pull request #5175 from Matt-Yorkley/memoize-scoper

Memoize ScopeProductToHub in product list
This commit is contained in:
Luis Ramos
2020-04-09 14:45:57 +01:00
committed by GitHub

View File

@@ -40,7 +40,7 @@ class ProductsRenderer
end
def product_scoper
OpenFoodNetwork::ScopeProductToHub.new(distributor)
@product_scoper ||= OpenFoodNetwork::ScopeProductToHub.new(distributor)
end
def enterprise_fee_calculator