Sha256: f6e9bc205ac76a7425d442367a036ba6dac9461906ee06d7fa003cd248eee0ef

Contents?: true

Size: 262 Bytes

Versions: 44

Compression:

Stored size: 262 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

44 entries across 44 versions & 1 rubygems

Version Path
composite_primary_keys-7.0.5 test/fixtures/tariff.rb
composite_primary_keys-7.0.4 test/fixtures/tariff.rb
composite_primary_keys-7.0.3 test/fixtures/tariff.rb
composite_primary_keys-7.0.2 test/fixtures/tariff.rb
composite_primary_keys-7.0.1 test/fixtures/tariff.rb
composite_primary_keys-7.0.0 test/fixtures/tariff.rb
composite_primary_keys-6.0.6 test/fixtures/tariff.rb
composite_primary_keys-6.0.5 test/fixtures/tariff.rb
composite_primary_keys-6.0.3 test/fixtures/tariff.rb
composite_primary_keys-5.0.14 test/fixtures/tariff.rb
composite_primary_keys-6.0.1 test/fixtures/tariff.rb
composite_primary_keys-6.0.0 test/fixtures/tariff.rb
composite_primary_keys-5.0.13 test/fixtures/tariff.rb
composite_primary_keys-5.0.12 test/fixtures/tariff.rb
composite_primary_keys-5.0.11 test/fixtures/tariff.rb
composite_primary_keys-5.0.10 test/fixtures/tariff.rb
composite_primary_keys-5.0.9 test/fixtures/tariff.rb
composite_primary_keys-5.0.8 test/fixtures/tariff.rb
composite_primary_keys-5.0.6 test/fixtures/tariff.rb
composite_primary_keys-5.0.5 test/fixtures/tariff.rb