#55 いったん中断;外部タグ分離優先

このコミットが含まれているのは:
2026-09-22 02:56:58 +09:00
コミット 1b1130ccd9
10個のファイルの変更98行の追加42行の削除
+6 -4
ファイルの表示
@@ -242,12 +242,14 @@ class Tag < ApplicationRecord
end
tag = tn.tag
unless tag
tag = Tag.find_undiscard_or_create_by!(tag_name_id: tn.id) do
_1.category = category
end
if tag
tag.update!(tag_name_id: tn.id) if tag.tag_name_id != tn.id
return tag
end
tag = Tag.create!(tag_name: tn, category:)
tn.update!(tag:)
tag
rescue ActiveRecord::RecordNotUnique
retry
+1 -1
ファイルの表示
@@ -1,5 +1,5 @@
class TagName < ApplicationRecord
belongs_to :tag
belongs_to :tag, optional: true
has_one :wiki_page
belongs_to :canonical, class_name: 'TagName', optional: true