Apply aliases to characters in <character>_(cosplay) tags (#3409).

This commit is contained in:
evazion
2017-12-06 12:33:06 -06:00
parent 131c0109d4
commit d6d73404a9
2 changed files with 9 additions and 1 deletions

View File

@@ -21,7 +21,7 @@ class TagImplication < TagRelationship
end
def automatic_tags_for(names)
tags = names.grep(/\A(.+)_\(cosplay\)\Z/) { "char:#{$1}" }
tags = names.grep(/\A(.+)_\(cosplay\)\Z/) { "char:#{TagAlias.to_aliased([$1]).first}" }
tags << "cosplay" if tags.present?
tags.uniq
end