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-9.0.0 test/fixtures/tariff.rb
composite_primary_keys-9.0.0.beta1 test/fixtures/tariff.rb
composite_primary_keys-8.1.3 test/fixtures/tariff.rb
composite_primary_keys-8.1.2 test/fixtures/tariff.rb
composite_primary_keys-7.0.16 test/fixtures/tariff.rb
composite_primary_keys-7.0.15 test/fixtures/tariff.rb
composite_primary_keys-8.1.1 test/fixtures/tariff.rb
composite_primary_keys-7.0.14 test/fixtures/tariff.rb
composite_primary_keys-8.1.0 test/fixtures/tariff.rb
composite_primary_keys-7.0.13 test/fixtures/tariff.rb
composite_primary_keys-6.0.8 test/fixtures/tariff.rb
composite_primary_keys-8.0.0 test/fixtures/tariff.rb
composite_primary_keys-7.0.12 test/fixtures/tariff.rb
composite_primary_keys-7.0.11 test/fixtures/tariff.rb
composite_primary_keys-6.0.7 test/fixtures/tariff.rb
composite_primary_keys-7.0.10 test/fixtures/tariff.rb
composite_primary_keys-7.0.9 test/fixtures/tariff.rb
composite_primary_keys-7.0.8 test/fixtures/tariff.rb
composite_primary_keys-7.0.7 test/fixtures/tariff.rb
composite_primary_keys-7.0.6 test/fixtures/tariff.rb