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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user