Sha256: b1f62b6366c632e47ac21750480504e2beee31fbdd80474ce1601c9e32b0bf5c

Contents?: true

Size: 369 Bytes

Versions: 29

Compression:

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

29 entries across 29 versions & 1 rubygems

Version Path
composite_primary_keys-13.0.1 test/fixtures/restaurant.rb
composite_primary_keys-13.0.0 test/fixtures/restaurant.rb
composite_primary_keys-12.0.10 test/fixtures/restaurant.rb
composite_primary_keys-12.0.9 test/fixtures/restaurant.rb
composite_primary_keys-12.0.8 test/fixtures/restaurant.rb
composite_primary_keys-12.0.6 test/fixtures/restaurant.rb
composite_primary_keys-12.0.5 test/fixtures/restaurant.rb
composite_primary_keys-12.0.4 test/fixtures/restaurant.rb
composite_primary_keys-12.0.3 test/fixtures/restaurant.rb
composite_primary_keys-12.0.2 test/fixtures/restaurant.rb
composite_primary_keys-11.3.1 test/fixtures/restaurant.rb
composite_primary_keys-8.1.8 test/fixtures/restaurant.rb
composite_primary_keys-12.0.1 test/fixtures/restaurant.rb
composite_primary_keys-12.0.0 test/fixtures/restaurant.rb
composite_primary_keys-12.0.0.rc5 test/fixtures/restaurant.rb
composite_primary_keys-12.0.0.rc4 test/fixtures/restaurant.rb
composite_primary_keys-12.0.0.rc3 test/fixtures/restaurant.rb
composite_primary_keys-12.0.0.rc2 test/fixtures/restaurant.rb
composite_primary_keys-12.0.0.rc1 test/fixtures/restaurant.rb
composite_primary_keys-8.1.7 test/fixtures/restaurant.rb