Sha256: 0211b17bb5a5adbad6b1e89f0d61e0602eacee016518140bcaf6db6e9135cb90
Contents?: true
Size: 594 Bytes
Versions: 9
Compression:
Stored size: 594 Bytes
Contents
module Piggybak module ActsAsSellableWithVariants extend ActiveSupport::Concern module ClassMethods def acts_as_sellable_with_variants has_many :variants, :dependent => :destroy, :class_name => "::PiggybakVariants::Variant", :as => :item accepts_nested_attributes_for :variants, :allow_destroy => true attr_accessible :variants_attributes #, :allow_destroy => true ::PiggybakVariants::OptionConfiguration::VARIANT_CLASSES << self.to_s end end end end ::ActiveRecord::Base.send :include, Piggybak::ActsAsSellableWithVariants
Version data entries
9 entries across 9 versions & 1 rubygems