Sha256: 1c87f7f844e5534b4e37e058f779de8b2091cb01e94366747a64989de53c9a12

Contents?: true

Size: 437 Bytes

Versions: 3

Compression:

Stored size: 437 Bytes

Contents

class TbCommerce::OptionSet < ActiveRecord::Base
  self.table_name = 'tb_commerce_option_sets'

  validates :name, :presence => true

  has_many :options, :inverse_of => :option_set, :dependent => :destroy, :foreign_key => :tb_commerce_option_set_id
  has_many :product_option_sets, :inverse_of => :option_set, :dependent => :destroy, :foreign_key => :tb_commerce_option_set_id
  has_many :products, :through => :product_option_sets
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tb_commerce-0.0.4 app/models/tb_commerce/option_set.rb
tb_commerce-0.0.3 app/models/tb_commerce/option_set.rb
tb_commerce-0.0.2 app/models/tb_commerce/option_set.rb