Rubocop autocorrect Performance/RedundantBlockCall issue and remove it from rubocop_todo list
This commit is contained in:
@@ -87,12 +87,6 @@ Metrics/ModuleLength:
|
||||
Metrics/PerceivedComplexity:
|
||||
Max: 11
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
Performance/RedundantBlockCall:
|
||||
Exclude:
|
||||
- 'app/mailers/mailer.rb'
|
||||
|
||||
# Offense count: 4
|
||||
# Cop supports --auto-correct.
|
||||
Performance/RedundantMatch:
|
||||
|
||||
@@ -113,7 +113,7 @@ class Mailer < ApplicationMailer
|
||||
|
||||
def with_user(user, &block)
|
||||
I18n.with_locale(user.locale) do
|
||||
block.call
|
||||
yield
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user