X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/2651db7254e4173de4698351eeeb2dc5ae66bdd1..75e135869e26a1aeae93f3334668de01c3bb2f69:/app/mailers/notifier.rb diff --git a/app/mailers/notifier.rb b/app/mailers/notifier.rb index 3c794cca9..3e0ba446d 100644 --- a/app/mailers/notifier.rb +++ b/app/mailers/notifier.rb @@ -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)