PERF: Remove N+1 queries on topic list page.
This commit is contained in:
parent
a1ea477604
commit
43f0884660
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue