]> git.openstreetmap.org Git - rails.git/blob - vendor/gems/composite_primary_keys-2.2.2/test/fixtures/product.rb
Use a list for the main menu, rather than br-separated links
[rails.git] / vendor / gems / composite_primary_keys-2.2.2 / test / fixtures / product.rb
1 class Product < ActiveRecord::Base
2         set_primary_keys :id  # redundant
3         has_many :product_tariffs, :foreign_key => :product_id
4         has_one :product_tariff, :foreign_key => :product_id
5
6         has_many :tariffs, :through => :product_tariffs, :foreign_key => [:tariff_id, :tariff_start_date]
7 end