before switch to ubuntu commit since apple has issues

This commit is contained in:
2015-08-13 12:54:02 +02:00
parent 6b764fcd39
commit 919474b54c
17 changed files with 81 additions and 41 deletions
+2 -1
View File
@@ -99,9 +99,10 @@ class Supplier
@active_orders
end
# Tody, simplify to List.active_for_supplier(self)
def active_lists(options = {})
return @active_lists if @active_lists
@active_lists = options[:section_id].present? ? List.active_for_supplier_and_section(self, options[:section_id]) : List.active_for_supplier(id)
@active_lists = options[:section_id].present? ? List.active_for_supplier_and_section(self, options[:section_id]) : List.active_for_supplier(self)
@active_lists.include_relations(table: :section, orders: {product_orders: :product})
@active_lists
end