Sha256: bcaf631d655103e6669f0094350fecd8c018bc718a2e0b083ff49308303ef788

Contents?: true

Size: 289 Bytes

Versions: 24

Compression:

Stored size: 289 Bytes

Contents

class Suburb < ActiveRecord::Base
  set_primary_keys :city_id, :suburb_id
  has_many :streets,  :foreign_key => [:city_id, :suburb_id]
  has_many :first_streets,  :foreign_key => [:city_id, :suburb_id], 
          :class_name => 'Street', :conditions => "streets.name = 'First Street'"
end

Version data entries

24 entries across 24 versions & 1 rubygems

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