big refactor for test and admin namespace

This commit is contained in:
2012-12-04 18:45:18 +01:00
parent 7d64ab2022
commit d8eef4a047
85 changed files with 1403 additions and 1272 deletions
+3 -1
View File
@@ -26,6 +26,8 @@ class Supplier
after_create :add_section_on_create
view :by_email, key: :email
def location=(val)
lat, lng = val.strip.split(/[ ,]+/).map(&:to_f)
self.lat = lat
@@ -45,7 +47,7 @@ class Supplier
end
def active_lists(options = {})
return @active_lists if @active_lists.present?
return @active_lists if @active_lists.present?
@active_lists = List.active_for_supplier(id)
@active_lists.include_relations(table: :section, orders: {product_orders: :product})
@active_lists