Autotag the meme tag on posts with *_(meme) tags

This commit is contained in:
nonamethanks
2021-10-06 18:06:46 +02:00
parent cc9d7b8349
commit d6daec8918

View File

@@ -352,6 +352,7 @@ class Tag < ApplicationRecord
tags += names.grep(/\A(.+)_\(cosplay\)\z/i) { "char:#{TagAlias.to_aliased([$1]).first}" }
tags << "cosplay" if names.any?(/_\(cosplay\)\z/i)
tags << "school_uniform" if names.any?(/_school_uniform\z/i)
tags << "meme" if names.any?(/_\(meme\)\z/i)
tags.uniq
end