Module: ShopVariants::Models::Product
- Defined in:
- lib/shop_variants/models/product.rb
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/shop_variants/models/product.rb', line 5 def self.included(base) base.class_eval do has_many :variants, :class_name => 'ShopProductVariant', :foreign_key => :product_id, :dependent => :destroy, :order => :position accepts_nested_attributes_for :variants end end |