continuing the refactor of the admin section
This commit is contained in:
@@ -10,6 +10,9 @@ class Product
|
||||
belongs_to :supplier # direct! category is an aid
|
||||
has_many :product_orders
|
||||
|
||||
attr_protected :supplier_id
|
||||
|
||||
validates :name, presence: true
|
||||
validates :supplier_id, presence: true
|
||||
validates :price, presence: true, numericality: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user