Browse Source

Autofix Rubocop Style/ExplicitBlockArgument (#23704)

closed-social-glitch-2
Nick Schonning 1 year ago
committed by GitHub
parent
commit
f0e1b12c10
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 10 deletions
  1. +0
    -6
      .rubocop_todo.yml
  2. +2
    -4
      app/mailers/application_mailer.rb

+ 0
- 6
.rubocop_todo.yml View File

@ -2323,12 +2323,6 @@ Style/ConcatArrayLiterals:
Style/Documentation:
Enabled: false
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/ExplicitBlockArgument:
Exclude:
- 'app/mailers/application_mailer.rb'
# Offense count: 10
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowedVars.

+ 2
- 4
app/mailers/application_mailer.rb View File

@ -9,9 +9,7 @@ class ApplicationMailer < ActionMailer::Base
protected
def locale_for_account(account)
I18n.with_locale(account.user_locale || I18n.default_locale) do
yield
end
def locale_for_account(account, &block)
I18n.with_locale(account.user_locale || I18n.default_locale, &block)
end
end

Loading…
Cancel
Save