Add push buttons and support inactive products

This commit is contained in:
2015-03-24 14:53:02 +01:00
parent b0bab98be8
commit e720d6b31c
22 changed files with 74 additions and 21 deletions
+2 -1
View File
@@ -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