This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user