diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 980339f49..bee9e7155 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -100,12 +100,6 @@ Naming/VariableNumber: - 'spec/models/domain_block_spec.rb' - 'spec/models/user_spec.rb' -# This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: SafeMultiline. -Performance/DeletePrefix: - Exclude: - - 'app/models/featured_tag.rb' - Performance/MapMethodChain: Exclude: - 'app/models/feed.rb' diff --git a/app/models/featured_tag.rb b/app/models/featured_tag.rb index 587dcf991..df23114a3 100644 --- a/app/models/featured_tag.rb +++ b/app/models/featured_tag.rb @@ -51,7 +51,7 @@ class FeaturedTag < ApplicationRecord private def strip_name - self.name = name&.strip&.gsub(/\A#/, '') + self.name = name&.strip&.delete_prefix('#') end def set_tag