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.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/models/tag.rb b/activerecord/test/models/tag.rb
index bc13c3a42d..e0d42f4f66 100644
--- a/activerecord/test/models/tag.rb
+++ b/activerecord/test/models/tag.rb
@@ -11,6 +11,6 @@ end
class OrderedTag < Tag
self.table_name = "tags"
- has_many :taggings, -> { order("taggings.id DESC") }, foreign_key: "tag_id"
+ has_many :taggings, -> { order(Arel.sql("taggings.id DESC")) }, foreign_key: "tag_id"
has_many :tagged_posts, through: :taggings, source: "taggable", source_type: "Post"
end