diff options
Diffstat (limited to 'activerecord/test/models/pet.rb')
-rw-r--r-- | activerecord/test/models/pet.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/test/models/pet.rb b/activerecord/test/models/pet.rb index f7970d7aab..51a3e42815 100644 --- a/activerecord/test/models/pet.rb +++ b/activerecord/test/models/pet.rb @@ -2,8 +2,11 @@ class Pet < ActiveRecord::Base attr_accessor :current_user self.primary_key = :pet_id - belongs_to :owner, :touch => true + belongs_to :owner, touch: true has_many :toys + has_many :pet_treasures + has_many :treasures, through: :pet_treasures + has_many :persons, through: :treasures, source: :looter, source_type: "Person" class << self attr_accessor :after_destroy_output |