big refactor for test and admin namespace
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user