このコミットが含まれているのは:
@@ -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
|
||||
|
||||
新しい課題から参照
ユーザをブロックする