Sha256: 6cb7123048f527387c9a0910c6398684f5c3062774b78556bd980f80a36aea5e

Contents?: true

Size: 294 Bytes

Versions: 44

Compression:

Stored size: 294 Bytes

Contents

class Tariff < ActiveRecord::Base
	self.primary_keys = [:tariff_id, :start_date]
	has_many :product_tariffs, :foreign_key => [:tariff_id, :tariff_start_date], :dependent => :delete_all
	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-13.0.1 test/fixtures/tariff.rb
composite_primary_keys-13.0.0 test/fixtures/tariff.rb
composite_primary_keys-12.0.10 test/fixtures/tariff.rb
composite_primary_keys-12.0.9 test/fixtures/tariff.rb
composite_primary_keys-12.0.8 test/fixtures/tariff.rb
composite_primary_keys-12.0.6 test/fixtures/tariff.rb
composite_primary_keys-12.0.5 test/fixtures/tariff.rb
composite_primary_keys-12.0.4 test/fixtures/tariff.rb
composite_primary_keys-12.0.3 test/fixtures/tariff.rb
composite_primary_keys-12.0.2 test/fixtures/tariff.rb
composite_primary_keys-11.3.1 test/fixtures/tariff.rb
composite_primary_keys-12.0.1 test/fixtures/tariff.rb
composite_primary_keys-12.0.0 test/fixtures/tariff.rb
composite_primary_keys-12.0.0.rc5 test/fixtures/tariff.rb
composite_primary_keys-12.0.0.rc4 test/fixtures/tariff.rb
composite_primary_keys-12.0.0.rc3 test/fixtures/tariff.rb
composite_primary_keys-12.0.0.rc2 test/fixtures/tariff.rb
composite_primary_keys-12.0.0.rc1 test/fixtures/tariff.rb
composite_primary_keys-11.2.0 test/fixtures/tariff.rb
composite_primary_keys-11.1.0 test/fixtures/tariff.rb