X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/a69f380fa5641192b55738d54f2c26e1403f6975..7a5ac0394dfcd5d1cd5a8b659563ddd7afc33332:/vendor/gems/composite_primary_keys-2.2.2/test/fixtures/tariff.rb diff --git a/vendor/gems/composite_primary_keys-2.2.2/test/fixtures/tariff.rb b/vendor/gems/composite_primary_keys-2.2.2/test/fixtures/tariff.rb index d5cb07da1..3feba4434 100644 --- a/vendor/gems/composite_primary_keys-2.2.2/test/fixtures/tariff.rb +++ b/vendor/gems/composite_primary_keys-2.2.2/test/fixtures/tariff.rb @@ -1,6 +1,6 @@ -class Tariff < ActiveRecord::Base - set_primary_keys [:tariff_id, :start_date] - has_many :product_tariffs, :foreign_key => [:tariff_id, :tariff_start_date] - has_one :product_tariff, :foreign_key => [:tariff_id, :tariff_start_date] - has_many :products, :through => :product_tariffs, :foreign_key => [:tariff_id, :tariff_start_date] -end +class Tariff < ActiveRecord::Base + set_primary_keys [:tariff_id, :start_date] + has_many :product_tariffs, :foreign_key => [:tariff_id, :tariff_start_date] + has_one :product_tariff, :foreign_key => [:tariff_id, :tariff_start_date] + has_many :products, :through => :product_tariffs, :foreign_key => [:tariff_id, :tariff_start_date] +end