Sha256: 239f4f990d4b6b08b70951268083f95c79662e961f89b33f2d11f084e8128537

Contents?: true

Size: 267 Bytes

Versions: 5

Compression:

Stored size: 267 Bytes

Contents

class Tariff < ActiveRecord::Base
	self.primary_keys = [:tariff_id, :start_date]
	has_many :product_tariffs, :foreign_key => [:tariff_id, :tariff_start_date]
	has_many :products, :through => :product_tariffs, :foreign_key => [:tariff_id, :tariff_start_date]
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
composite_primary_keys-8.1.8 test/fixtures/tariff.rb
composite_primary_keys-8.1.7 test/fixtures/tariff.rb
composite_primary_keys-8.1.6 test/fixtures/tariff.rb
composite_primary_keys-8.1.5 test/fixtures/tariff.rb
composite_primary_keys-8.1.4 test/fixtures/tariff.rb