X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/a69f380fa5641192b55738d54f2c26e1403f6975..7a5ac0394dfcd5d1cd5a8b659563ddd7afc33332:/vendor/gems/composite_primary_keys-2.2.2/test/fixtures/product.rb diff --git a/vendor/gems/composite_primary_keys-2.2.2/test/fixtures/product.rb b/vendor/gems/composite_primary_keys-2.2.2/test/fixtures/product.rb index 5466dcabe..e780fd2f4 100644 --- a/vendor/gems/composite_primary_keys-2.2.2/test/fixtures/product.rb +++ b/vendor/gems/composite_primary_keys-2.2.2/test/fixtures/product.rb @@ -1,7 +1,7 @@ -class Product < ActiveRecord::Base - set_primary_keys :id # redundant - has_many :product_tariffs, :foreign_key => :product_id - has_one :product_tariff, :foreign_key => :product_id - - has_many :tariffs, :through => :product_tariffs, :foreign_key => [:tariff_id, :tariff_start_date] -end +class Product < ActiveRecord::Base + set_primary_keys :id # redundant + has_many :product_tariffs, :foreign_key => :product_id + has_one :product_tariff, :foreign_key => :product_id + + has_many :tariffs, :through => :product_tariffs, :foreign_key => [:tariff_id, :tariff_start_date] +end