Setup of product variants
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
class ProductVariant
|
||||
include SimplyStored::Couch
|
||||
include ActiveModel::SerializerSupport
|
||||
property :name
|
||||
property :position, type: Fixnum, default: 0
|
||||
belongs_to :product
|
||||
end
|
||||
Reference in New Issue
Block a user