Fix Style/ExplicitBlockArgument warnings

This commit is contained in:
Tom Hughes 2020-08-09 18:45:01 +01:00
parent 2651db7254
commit 75e135869e
5 changed files with 12 additions and 33 deletions

View file

@ -202,10 +202,8 @@ class Notifier < ApplicationMailer
end
end
def with_recipient_locale(recipient)
I18n.with_locale Locale.available.preferred(recipient.preferred_languages) do
yield
end
def with_recipient_locale(recipient, &block)
I18n.with_locale(Locale.available.preferred(recipient.preferred_languages), &block)
end
def from_address(name, type, id, digest, user_id = nil)