Sha256: 673b18d727dcd96348c872a484e197459e870fd5b3c2075a7e088eddbbe89d64

Contents?: true

Size: 357 Bytes

Versions: 16

Compression:

Stored size: 357 Bytes

Contents

class Restaurant < ActiveRecord::Base
  set_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

16 entries across 16 versions & 1 rubygems

Version Path
composite_primary_keys-3.1.11 test/fixtures/restaurant.rb
composite_primary_keys-5.0.0.rc1 test/fixtures/restaurant.rb
composite_primary_keys-4.1.2 test/fixtures/restaurant.rb
composite_primary_keys-4.1.1 test/fixtures/restaurant.rb
composite_primary_keys-4.0.0 test/fixtures/restaurant.rb
composite_primary_keys-4.0.0.beta9 test/fixtures/restaurant.rb
composite_primary_keys-4.0.0.beta8 test/fixtures/restaurant.rb
composite_primary_keys-4.0.0.beta7 test/fixtures/restaurant.rb
composite_primary_keys-4.0.0.beta6 test/fixtures/restaurant.rb
composite_primary_keys-4.0.0.beta5 test/fixtures/restaurant.rb
composite_primary_keys-4.0.0.beta4 test/fixtures/restaurant.rb
composite_primary_keys-4.0.0.beta3 test/fixtures/restaurant.rb
composite_primary_keys-3.1.10 test/fixtures/restaurant.rb
composite_primary_keys-4.0.0.beta2 test/fixtures/restaurant.rb
composite_primary_keys-4.0.0.beta1 test/fixtures/restaurant.rb
composite_primary_keys-3.1.9 test/fixtures/restaurant.rb