PERF: Remove N+1 queries on topic list page.

This commit is contained in:
Vinoth Kannan 2018-02-23 20:05:51 +05:30
parent a1ea477604
commit 43f0884660
1 changed files with 2 additions and 1 deletions

View File

@ -8,7 +8,8 @@ module TopicTagsMixin
end
def tags
topic.tags.pluck(:name)
# Calling method `pluck` along with `includes` causing N+1 queries
topic.tags.map(&:name)
end
def topic