X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a69f380fa5641192b55738d54f2c26e1403f6975..3d4b2176ff040b9b79b05873579ab54a69a731ec:/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