Sha256: db0713a911c190e8bf9a4dc2eea9a6016153c3b25b085038a24d7c51937ae607

Contents?: true

Size: 354 Bytes

Versions: 2

Compression:

Stored size: 354 Bytes

Contents

class Product < ActiveRecord::Base
	set_primary_keys :id  # redundant
	has_many :product_tariffs, :foreign_key => :product_id, :dependent => :delete_all
	# Yeah, this is fake, it uses for testing
  has_one :product_tariff, :foreign_key => :product_id
	has_many :tariffs, :through => :product_tariffs, :foreign_key => [:tariff_id, :tariff_start_date]
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
composite_primary_keys-3.1.8 test/fixtures/product.rb
composite_primary_keys-3.1.7 test/fixtures/product.rb