mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-14 04:04:23 +00:00
Implement and use scopes for finding products by distributor via order cycle or product distribution
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
require 'open_food_web/queries_product_distribution'
|
||||
|
||||
class ApplicationController < ActionController::Base
|
||||
protect_from_forgery
|
||||
|
||||
@@ -12,7 +14,7 @@ class ApplicationController < ActionController::Base
|
||||
def load_data_for_sidebar
|
||||
@suppliers = Enterprise.is_primary_producer
|
||||
@order_cycles = OrderCycle.active
|
||||
@distributors = QueriesProductDistribution.active_distributors
|
||||
@distributors = OpenFoodWeb::QueriesProductDistribution.active_distributors
|
||||
end
|
||||
|
||||
# All render calls within the block will be performed with the specified format
|
||||
|
||||
Reference in New Issue
Block a user