aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/tag.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/models/tag.rb')
-rw-r--r--activerecord/test/models/tag.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/tag.rb b/activerecord/test/models/tag.rb
index 4495ac4a09..bc13c3a42d 100644
--- a/activerecord/test/models/tag.rb
+++ b/activerecord/test/models/tag.rb
@@ -12,4 +12,5 @@ class OrderedTag < Tag
self.table_name = "tags"
has_many :taggings, -> { order("taggings.id DESC") }, foreign_key: "tag_id"
+ has_many :tagged_posts, through: :taggings, source: "taggable", source_type: "Post"
end