Sha256: fed60447cc8f472841fc3d3e71ee076750b2ad4cdbeba0922c92a49b6bafe8d5

Contents?: true

Size: 360 Bytes

Versions: 81

Compression:

Stored size: 360 Bytes

Contents

class Restaurant < ActiveRecord::Base
  self.primary_keys = :franchise_id, :store_id
  has_and_belongs_to_many :suburbs, 
    :foreign_key => [:franchise_id, :store_id],  
    :association_foreign_key => [:city_id, :suburb_id]
  has_and_belongs_to_many :products,
    :foreign_key => [:franchise_id, :store_id],
    :association_foreign_key => :product_id
end

Version data entries

81 entries across 81 versions & 1 rubygems

Version Path
composite_primary_keys-8.1.2 test/fixtures/restaurant.rb
composite_primary_keys-7.0.16 test/fixtures/restaurant.rb
composite_primary_keys-7.0.15 test/fixtures/restaurant.rb
composite_primary_keys-8.1.1 test/fixtures/restaurant.rb
composite_primary_keys-7.0.14 test/fixtures/restaurant.rb
composite_primary_keys-8.1.0 test/fixtures/restaurant.rb
composite_primary_keys-7.0.13 test/fixtures/restaurant.rb
composite_primary_keys-6.0.8 test/fixtures/restaurant.rb
composite_primary_keys-8.0.0 test/fixtures/restaurant.rb
composite_primary_keys-7.0.12 test/fixtures/restaurant.rb
composite_primary_keys-7.0.11 test/fixtures/restaurant.rb
composite_primary_keys-6.0.7 test/fixtures/restaurant.rb
composite_primary_keys-7.0.10 test/fixtures/restaurant.rb
composite_primary_keys-7.0.9 test/fixtures/restaurant.rb
composite_primary_keys-7.0.8 test/fixtures/restaurant.rb
composite_primary_keys-7.0.7 test/fixtures/restaurant.rb
composite_primary_keys-7.0.6 test/fixtures/restaurant.rb
composite_primary_keys-7.0.5 test/fixtures/restaurant.rb
composite_primary_keys-7.0.4 test/fixtures/restaurant.rb
composite_primary_keys-7.0.3 test/fixtures/restaurant.rb