Inject only needed enterprises into cart and checkout

This commit is contained in:
Maikel Linke
2016-07-06 11:14:13 +10:00
parent c253d73d11
commit f984871b23
4 changed files with 8 additions and 4 deletions

View File

@@ -231,8 +231,8 @@ class Enterprise < ActiveRecord::Base
end
def relatives_and_oc_producers(order_cycles)
enterprise_ids = Exchange.in_order_cycle(order_cycles).incoming.pluck :sender_id
Enterprise.relatives_of_one_union_others(id, enterprise_ids)
oc_producer_ids = Exchange.in_order_cycle(order_cycles).incoming.pluck :sender_id
Enterprise.relatives_of_one_union_others(id, oc_producer_ids)
end
def relatives_including_self