#55 いったん中断;外部タグ分離優先
このコミットが含まれているのは:
@@ -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,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
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする