TagName サニタイズ(#281) (#289)

#281

#281

Merge remote-tracking branch 'origin/main' into feature/281

#281

#281 テストまだ通ってないので要確認

Co-authored-by: miteruzo <miteruzo@naver.com>
Reviewed-on: #289
This commit was merged in pull request #289.
This commit is contained in:
2026-03-12 21:58:16 +09:00
parent 176519b929
commit d772cceb5e
16 changed files with 351 additions and 27 deletions
+2 -2
View File
@@ -8,8 +8,8 @@ RSpec.describe "nico:sync" do
end
def create_tag!(name, category:)
tn = TagName.find_or_create_by!(name: name.to_s.strip)
Tag.find_or_create_by!(tag_name_id: tn.id) { |t| t.category = category }
tn = TagName.find_undiscard_or_create_by!(name: name.to_s.strip)
Tag.find_undiscard_or_create_by!(tag_name_id: tn.id) { |t| t.category = category }
end
def link_nico_to_tag!(nico_tag, tag)