Working in progress app
This commit is contained in:
@@ -69,6 +69,12 @@ class ProductCategory
|
||||
product_categories
|
||||
end
|
||||
|
||||
def active?(time = Time.now)
|
||||
return true unless time_zone = supplier.time_zone.presence # cannot do activity magic without the appropriate time zone
|
||||
|
||||
true
|
||||
end
|
||||
|
||||
def to_client_format
|
||||
return {} unless products.present?
|
||||
{name: name, products: products.to_a.map{|p| p.as_json}}
|
||||
|
||||
Reference in New Issue
Block a user