aliases: remove minimum post count requirement.

Remove the soft requirement that the destination tag must have 50 posts
in order to request an alias. This often gets in the way when trying to
rename a tag to a new name that doesn't already exist.
This commit is contained in:
evazion
2020-02-22 01:42:01 -06:00
parent c1f7b76bdb
commit c6de2ecd12

View File

@@ -3,7 +3,6 @@ class TagAlias < TagRelationship
validates_uniqueness_of :antecedent_name, scope: :status, conditions: -> { active }
validate :absence_of_transitive_relation
validate :wiki_pages_present, on: :create, unless: :skip_secondary_validations
validate :mininum_antecedent_count, on: :create, unless: :skip_secondary_validations
module ApprovalMethods
def approve!(approver: CurrentUser.user, update_topic: true)
@@ -143,12 +142,6 @@ class TagAlias < TagRelationship
end
end
def mininum_antecedent_count
if antecedent_tag.post_count < 50
errors[:base] << "The #{antecedent_name} tag must have at least 50 posts for an alias to be created"
end
end
def create_mod_action
alias_desc = %("tag alias ##{id}":[#{Rails.application.routes.url_helpers.tag_alias_path(self)}]: [[#{antecedent_name}]] -> [[#{consequent_name}]])