Fix Performance/DeletePrefix cop (#27448)
				
					
				
			This commit is contained in:
		@@ -100,12 +100,6 @@ Naming/VariableNumber:
 | 
				
			|||||||
    - 'spec/models/domain_block_spec.rb'
 | 
					    - 'spec/models/domain_block_spec.rb'
 | 
				
			||||||
    - 'spec/models/user_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:
 | 
					Performance/MapMethodChain:
 | 
				
			||||||
  Exclude:
 | 
					  Exclude:
 | 
				
			||||||
    - 'app/models/feed.rb'
 | 
					    - 'app/models/feed.rb'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -51,7 +51,7 @@ class FeaturedTag < ApplicationRecord
 | 
				
			|||||||
  private
 | 
					  private
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def strip_name
 | 
					  def strip_name
 | 
				
			||||||
    self.name = name&.strip&.gsub(/\A#/, '')
 | 
					    self.name = name&.strip&.delete_prefix('#')
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def set_tag
 | 
					  def set_tag
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user