Sha256: 7492224762ae5311be3b87297f4a0f09e09d8b0a8d48fa09696f76d8b2ad667d
Contents?: true
Size: 368 Bytes
Versions: 2
Compression:
Stored size: 368 Bytes
Contents
module ShopVariants module Models module Product def self.included(base) base.class_eval do has_many :variants, :class_name => 'ShopProductVariant', :foreign_key => :product_id, :dependent => :destroy, :order => 'name ASC' accepts_nested_attributes_for :variants end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
radiant-shop_variants-extension-0.1.2 | lib/shop_variants/models/product.rb |
radiant-shop_variants-extension-0.1.1 | lib/shop_variants/models/product.rb |