When looking up distributors for sidebar, include both those in ProductDistributions and in OrderCycles

This commit is contained in:
Rohan Mitchell
2013-02-20 11:25:24 +11:00
parent 1285d507eb
commit 265336b70c
3 changed files with 35 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ class ApplicationController < ActionController::Base
def load_data_for_sidebar
@suppliers = Enterprise.is_primary_producer
@order_cycles = OrderCycle.active
@distributors = @order_cycles.map { |oc| oc.distributors }.flatten.uniq
@distributors = QueriesProductDistribution.active_distributors
end
# All render calls within the block will be performed with the specified format