このコミットが含まれているのは:
2026-03-11 12:43:08 +09:00
コミット 5e28159326
3個のファイルの変更24行の追加2行の削除
+5 -1
ファイルの表示
@@ -1,8 +1,12 @@
class Tag < ApplicationRecord
include Discard::Model
class NicoTagNormalisationError < ArgumentError
;
end
default_scope -> { kept }
has_many :post_tags, inverse_of: :tag
has_many :active_post_tags, -> { kept }, class_name: 'PostTag', inverse_of: :tag
has_many :post_tags_with_discarded, -> { with_discarded }, class_name: 'PostTag'
@@ -160,7 +164,7 @@ class Tag < ApplicationRecord
end
tag_name = st.tag_name
st.destroy!
st.discard!
tag_name.reload
tag_name.update!(canonical: target_tag.tag_name)
end