Sha256: 3770e99589962d2cac0fe9aaf0a40f5da9fe05d21291423e17d86b197a32ce75

Contents?: true

Size: 236 Bytes

Versions: 29

Compression:

Stored size: 236 Bytes

Contents

class ProductTariff < ActiveRecord::Base
	self.primary_keys = :product_id, :tariff_id, :tariff_start_date
	belongs_to :product, :foreign_key => :product_id
	belongs_to :tariff,  :foreign_key => [:tariff_id, :tariff_start_date]
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
composite_primary_keys-11.2.0 test/fixtures/product_tariff.rb
composite_primary_keys-11.1.0 test/fixtures/product_tariff.rb
composite_primary_keys-11.0.3 test/fixtures/product_tariff.rb
composite_primary_keys-11.0.2 test/fixtures/product_tariff.rb
composite_primary_keys-10.0.5 test/fixtures/product_tariff.rb
composite_primary_keys-9.0.10 test/fixtures/product_tariff.rb
composite_primary_keys-11.0.1 test/fixtures/product_tariff.rb
composite_primary_keys-11.0.0 test/fixtures/product_tariff.rb
composite_primary_keys-10.0.4 test/fixtures/product_tariff.rb