artists: reduce queries in artist summaries.

Avoid a few queries when searching for single artist tags.
This commit is contained in:
evazion
2019-09-05 00:00:15 -05:00
parent 416f817f6d
commit fc3b822bdf
3 changed files with 2 additions and 28 deletions

View File

@@ -386,14 +386,6 @@ class Artist < ApplicationRecord
end
module TagMethods
def has_tag_alias?
TagAlias.active.exists?(["antecedent_name = ?", name])
end
def tag_alias_name
TagAlias.active.find_by_antecedent_name(name).consequent_name
end
def category_name
Tag.category_for(name)
end