aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/pet.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/models/pet.rb')
-rw-r--r--activerecord/test/models/pet.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/test/models/pet.rb b/activerecord/test/models/pet.rb
index f7970d7aab..53489fa1b3 100644
--- a/activerecord/test/models/pet.rb
+++ b/activerecord/test/models/pet.rb
@@ -4,6 +4,9 @@ class Pet < ActiveRecord::Base
self.primary_key = :pet_id
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