Add push buttons and support inactive products
This commit is contained in:
@@ -8,6 +8,7 @@ class Product
|
||||
property :price, type: Float
|
||||
property :description
|
||||
property :visible, type: :boolean, default: true
|
||||
property :active, type: :boolean, default: true
|
||||
property :position, type: Fixnum
|
||||
|
||||
belongs_to :product_category
|
||||
@@ -19,7 +20,7 @@ class Product
|
||||
|
||||
validates :name, presence: true
|
||||
validates :supplier_id, presence: true
|
||||
validates :price, numericality: {greater_than: 0}
|
||||
validates :price, numericality: true
|
||||
view :by_supplier_id_and_id, key: [:supplier_id, :_id]
|
||||
|
||||
#after_save :persist_product_category_ids
|
||||
|
||||
Reference in New Issue
Block a user