From c6de2ecd122359a7cfd2123cb3abcdc2aca618c5 Mon Sep 17 00:00:00 2001 From: evazion Date: Sat, 22 Feb 2020 01:42:01 -0600 Subject: [PATCH] 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. --- app/models/tag_alias.rb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/app/models/tag_alias.rb b/app/models/tag_alias.rb index 3c928a4f6..58e6ab5db 100644 --- a/app/models/tag_alias.rb +++ b/app/models/tag_alias.rb @@ -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}]])