remove denormalization of lists and orders towards the section

This commit is contained in:
2015-10-12 15:25:58 +02:00
parent a6c74f1872
commit 86e518890f
5 changed files with 22 additions and 27 deletions
+2
View File
@@ -92,6 +92,7 @@ class Supplier
employee_settings.for_employee(employee)
end
#TODO: depricate
def active_orders(options = {})
return @active_orders if @active_orders && @active_orders_options == options
@active_orders_options = options
@@ -101,6 +102,7 @@ class Supplier
end
# Tody, simplify to List.active_for_supplier(self)
#TODO: depricate
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(self)