Sha256: 4d9f65b05dadfff6fb80af8d17bec192d881acf6c43bf5948b3efade9587c5bd

Contents?: true

Size: 289 Bytes

Versions: 17

Compression:

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

17 entries across 17 versions & 1 rubygems

Version Path
composite_primary_keys-14.0.9 test/fixtures/tariff.rb
composite_primary_keys-14.0.8 test/fixtures/tariff.rb
composite_primary_keys-13.0.8 test/fixtures/tariff.rb
composite_primary_keys-14.0.7 test/fixtures/tariff.rb
composite_primary_keys-14.0.6 test/fixtures/tariff.rb
composite_primary_keys-13.0.7 test/fixtures/tariff.rb
composite_primary_keys-13.0.6 test/fixtures/tariff.rb
composite_primary_keys-14.0.5 test/fixtures/tariff.rb
composite_primary_keys-13.0.5 test/fixtures/tariff.rb
composite_primary_keys-13.0.4 test/fixtures/tariff.rb
composite_primary_keys-14.0.4 test/fixtures/tariff.rb
composite_primary_keys-14.0.3 test/fixtures/tariff.rb
composite_primary_keys-13.0.3 test/fixtures/tariff.rb
composite_primary_keys-14.0.2 test/fixtures/tariff.rb
composite_primary_keys-13.0.2 test/fixtures/tariff.rb
composite_primary_keys-14.0.1 test/fixtures/tariff.rb
composite_primary_keys-11.0.0.rc2 test/fixtures/tariff.rb