Sha256: 5009b6b10a9d8250711a20df4a7a3c232dd1a25770c25b27f7db0aff2a71b0bb
Contents?: true
Size: 467 Bytes
Versions: 11
Compression:
Stored size: 467 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 scope :ordered, :order => "position ASC" scope :hash_ordered, :include => :option, :order => "options.position ASC, option_values.position ASC" def admin_label "#{self.option.name}: #{self.name}" end end end
Version data entries
11 entries across 11 versions & 1 rubygems