Setup of product variants

This commit is contained in:
2015-04-08 09:37:39 +02:00
parent 2503e09f65
commit a7a953dadb
13 changed files with 116 additions and 7 deletions
+1
View File
@@ -15,6 +15,7 @@ class Product
#has_and_belongs_to_many :product_categories, storing_keys: false
belongs_to :supplier # direct! category is an aid
has_many :product_orders
has_many :product_variants
attr_protected :supplier_id
+7
View File
@@ -0,0 +1,7 @@
class ProductVariant
include SimplyStored::Couch
include ActiveModel::SerializerSupport
property :name
property :position, type: Fixnum, default: 0
belongs_to :product
end