tags: don't create mod action when tag is deprecated.
Not needed anymore since deprecations are now tracked in the tag history.
This commit is contained in:
@@ -25,7 +25,6 @@ class Tag < ApplicationRecord
|
|||||||
validates :category, inclusion: { in: TagCategory.category_ids }
|
validates :category, inclusion: { in: TagCategory.category_ids }
|
||||||
|
|
||||||
before_create :create_character_tag_for_cosplay_tag, if: :is_cosplay_tag?
|
before_create :create_character_tag_for_cosplay_tag, if: :is_cosplay_tag?
|
||||||
before_save :create_mod_action
|
|
||||||
after_save :update_category_cache, if: :saved_change_to_category?
|
after_save :update_category_cache, if: :saved_change_to_category?
|
||||||
after_save :update_category_post_counts, if: :saved_change_to_category?
|
after_save :update_category_post_counts, if: :saved_change_to_category?
|
||||||
|
|
||||||
@@ -212,17 +211,6 @@ class Tag < ApplicationRecord
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
concerning :DeprecationMethods do
|
|
||||||
def create_mod_action
|
|
||||||
return if CurrentUser.user == User.system
|
|
||||||
if is_deprecated_was == true and is_deprecated == false
|
|
||||||
ModAction.log("marked the tag [[#{name}]] as not deprecated", :tag_undeprecate)
|
|
||||||
elsif is_deprecated_was == false and is_deprecated == true
|
|
||||||
ModAction.log("marked the tag [[#{name}]] as deprecated", :tag_deprecate)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
concerning :WordMethods do
|
concerning :WordMethods do
|
||||||
# Characters that delimit words in tags.
|
# Characters that delimit words in tags.
|
||||||
WORD_DELIMITERS = " _+:;!./()-"
|
WORD_DELIMITERS = " _+:;!./()-"
|
||||||
|
|||||||
Reference in New Issue
Block a user