Sha256: 784f63ed7938f536fd02626bac45595b3fa1d87c7ebbc47b3b01dd28ad10355c

Contents?: true

Size: 600 Bytes

Versions: 14

Compression:

Stored size: 600 Bytes

Contents

module PiggybakVariants
  class Option < ActiveRecord::Base
    self.table_name = "options"

    attr_accessible :name, :position
    has_many :option_values, :dependent => :destroy
    has_many :option_configurations, :dependent => :destroy

    default_scope :order => "position ASC"

    accepts_nested_attributes_for :option_values, :allow_destroy => true
    attr_accessible :option_values_attributes, :allow_destroy => true

    accepts_nested_attributes_for :option_configurations, :allow_destroy => true
    attr_accessible :option_configurations_attributes, :allow_destroy => true
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
piggybak_variants-0.0.17 app/models/piggybak_variants/option.rb
piggybak_variants-0.0.15 app/models/piggybak_variants/option.rb
piggybak_variants-0.0.14 app/models/piggybak_variants/option.rb
piggybak_variants-0.0.13 app/models/piggybak_variants/option.rb
piggybak_variants-0.0.12 app/models/piggybak_variants/option.rb
piggybak_variants-0.0.11 app/models/piggybak_variants/option.rb
piggybak_variants-0.0.10 app/models/piggybak_variants/option.rb
piggybak_variants-0.0.9 app/models/piggybak_variants/option.rb
piggybak_variants-0.0.8 app/models/piggybak_variants/option.rb
piggybak_variants-0.0.7 app/models/piggybak_variants/option.rb
piggybak_variants-0.0.6 app/models/piggybak_variants/option.rb
piggybak_variants-0.0.5 app/models/piggybak_variants/option.rb
piggybak_variants-0.0.4 app/models/piggybak_variants/option.rb
piggybak_variants-0.0.2 app/models/piggybak_variants/option.rb