From d6daec89189571127d712140637111706fa858a9 Mon Sep 17 00:00:00 2001 From: nonamethanks Date: Wed, 6 Oct 2021 18:06:46 +0200 Subject: [PATCH] Autotag the meme tag on posts with *_(meme) tags --- app/models/tag.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/tag.rb b/app/models/tag.rb index 68981774b..2eab7fe6b 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -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