posts: eliminate redundant tag load on posts show page.

Eliminate an unnecessary `SELECT name, post_count, category FROM tags WHERE name IN (?)`
query on the post show page. This query was used by `humanized_essential_tag_string`
when generating the page title. This query was redundant because we already use
another query to load the tag list with `SELECT * FROM tags WHERE name IN (?)`.
This commit is contained in:
evazion
2022-04-17 23:50:33 -05:00
parent 219a0959a5
commit 436f3eaf5d

View File

@@ -44,7 +44,7 @@ class TagSetPresenter
private
def tags
Tag.where(name: tag_names).select(:name, :post_count, :category)
Tag.where(name: tag_names)
end
def tags_by_category