rails/activerecord/test/models/owner.rb
Jim Remsik and Tim Pope 1e6c50e21b Ensure has_many :through works with changed primary keys [#736 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-09 13:43:28 +00:00

6 lines
118 B
Ruby

class Owner < ActiveRecord::Base
set_primary_key :owner_id
has_many :pets
has_many :toys, :through => :pets
end