feat: “ニジラー情報不詳” タグの自動付与(#106) (#196)
#106 #106 エラー対応 #106 Merge branch 'main' into '#106' Merge branch 'main' into '#106' Merge remote-tracking branch 'origin/main' into '#106' #106 誤字 Merge remote-tracking branch 'origin/main' into '#106' #106 ニジラー情報なし Co-authored-by: miteruzo <miteruzo@naver.com> Reviewed-on: #196
This commit was merged in pull request #196.
This commit is contained in:
@@ -76,6 +76,10 @@ class Tag < ApplicationRecord
|
||||
@bot ||= find_or_create_by_tag_name!('bot操作', category: :meta)
|
||||
end
|
||||
|
||||
def self.no_deerjikist
|
||||
@no_deerjikist ||= find_or_create_by_tag_name!('ニジラー情報不詳', category: :meta)
|
||||
end
|
||||
|
||||
def self.video
|
||||
@video ||= find_or_create_by_tag_name!('動画', category: :meta)
|
||||
end
|
||||
@@ -100,6 +104,7 @@ class Tag < ApplicationRecord
|
||||
end
|
||||
|
||||
tags << Tag.tagme if with_tagme && tags.size < 10 && tags.none?(Tag.tagme)
|
||||
tags << Tag.no_deerjikist if tags.all? { |t| t.category != 'deerjikist' }
|
||||
tags.uniq(&:id)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user