Sha256: af334a0744dccd255684ec2c2f6c43132f129cd1a1462c3e431fedc3789d4722

Contents?: true

Size: 415 Bytes

Versions: 1

Compression:

Stored size: 415 Bytes

Contents

module PiggybakVariants
  class OptionValue < ActiveRecord::Base
    self.table_name = "option_values"

    attr_accessible :name, :position
    has_and_belongs_to_many :variants
    belongs_to :option, :inverse_of => :option_values

    default_scope :include => :option, :order => "options.position ASC, option_values.position ASC"

    def admin_label
      "#{self.option.name}: #{self.name}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
piggybak_variants-0.0.4 app/models/piggybak_variants/option_value.rb