This commit is contained in:
2026-04-19 17:58:06 +09:00
parent 96307af509
commit 58429c5e8b
4 changed files with 5 additions and 7 deletions
+3 -3
View File
@@ -180,7 +180,6 @@ class Tag < ApplicationRecord
end
source_tag.discard!
TagVersioning.record!(source_tag, event_type: :discard, created_by_user:)
if source_tag.nico?
source_tag_name.discard!
@@ -189,6 +188,7 @@ class Tag < ApplicationRecord
updated_at: Time.current)
end
TagVersioning.record!(source_tag, event_type: :discard, created_by_user:)
TagVersioning.record!(target_tag, event_type: :update, created_by_user:)
end
@@ -205,9 +205,9 @@ class Tag < ApplicationRecord
def snapshot_aliases = tag_name.aliases.kept.order(:name).pluck(:name)
def snapshot_parent_tag_ids = parents.order('id').pluck('id')
def snapshot_parent_tag_ids = parents.order(:id).pluck(:id)
def snapshot_linked_tags
def snapshot_linked_tag_names
linked_tags.joins(:tag_name).order('tag_names.name').pluck('tag_names.name')
end
-2
View File
@@ -4,8 +4,6 @@ require 'set'
class WikiPage < ApplicationRecord
include MyDiscard
default_scope -> { kept }
has_many :wiki_revisions, dependent: :destroy
belongs_to :created_user, class_name: 'User'
belongs_to :updated_user, class_name: 'User'