Sha256: 40a1415e785ed51562d27112ee84dfaf1a9407b11c40078e178d3b1d2840547e

Contents?: true

Size: 292 Bytes

Versions: 19

Compression:

Stored size: 292 Bytes

Contents

class Suburb < ActiveRecord::Base
  self.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

19 entries across 19 versions & 1 rubygems

Version Path
composite_primary_keys-6.0.7 test/fixtures/suburb.rb
composite_primary_keys-6.0.6 test/fixtures/suburb.rb
composite_primary_keys-6.0.5 test/fixtures/suburb.rb
composite_primary_keys-6.0.3 test/fixtures/suburb.rb
composite_primary_keys-5.0.14 test/fixtures/suburb.rb
composite_primary_keys-6.0.1 test/fixtures/suburb.rb
composite_primary_keys-6.0.0 test/fixtures/suburb.rb
composite_primary_keys-5.0.13 test/fixtures/suburb.rb
composite_primary_keys-5.0.12 test/fixtures/suburb.rb
composite_primary_keys-5.0.11 test/fixtures/suburb.rb
composite_primary_keys-5.0.10 test/fixtures/suburb.rb
composite_primary_keys-5.0.9 test/fixtures/suburb.rb
composite_primary_keys-5.0.8 test/fixtures/suburb.rb
composite_primary_keys-5.0.6 test/fixtures/suburb.rb
composite_primary_keys-5.0.5 test/fixtures/suburb.rb
composite_primary_keys-5.0.4 test/fixtures/suburb.rb
composite_primary_keys-5.0.2 test/fixtures/suburb.rb
composite_primary_keys-5.0.1 test/fixtures/suburb.rb
composite_primary_keys-5.0.0 test/fixtures/suburb.rb