Files
mozo-backend/app/models/product_category.rb
T
2012-08-29 17:42:04 +02:00

15 lines
282 B
Ruby

class ProductCategory
include SimplyStored::Couch
property :name
property :position, type: Fixnum, default: 0
belongs_to :supplier
has_many :products
attr_protected :supplier_id
validates :position, numericality: true
validates :supplier_id, presence: true
end