progress and end of day commit

This commit is contained in:
2012-08-22 21:58:20 +02:00
parent 0856528f5e
commit 13dd2bf335
11 changed files with 95 additions and 16 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ class Product
property :name
property :code
property :price
property :price, type: Float
belongs_to :product_category
belongs_to :supplier # direct! category is an aid
+5
View File
@@ -2,6 +2,11 @@ class ProductCategory
include SimplyStored::Couch
property :name
property :position, type: Fixnum, default: 0
belongs_to :supplier
has_many :products
validates :position, numericality: true
validates :supplier_id, presence: true
end