about summary refs log tree commit diff
path: root/app/models/trending_tags.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/trending_tags.rb')
-rw-r--r--app/models/trending_tags.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/trending_tags.rb b/app/models/trending_tags.rb
index c69f6d3c3..9c2aa0ee8 100644
--- a/app/models/trending_tags.rb
+++ b/app/models/trending_tags.rb
@@ -91,7 +91,7 @@ class TrendingTags
 
       tags = Tag.where(id: tag_ids)
       tags = tags.trendable if filtered
-      tags = tags.each_with_object({}) { |tag, h| h[tag.id] = tag }
+      tags = tags.index_by(&:id)
 
       tag_ids.map { |tag_id| tags[tag_id] }.compact.take(limit)
     end