]> git.openstreetmap.org Git - rails.git/blobdiff - app/mailers/notifier.rb
Merge remote-tracking branch 'upstream/pull/2881'
[rails.git] / app / mailers / notifier.rb
index 3c794cca92f45d376c95ebe4945b150fd713aa22..3e0ba446d59b25d3e2eae72daecbb114eb1dca6d 100644 (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)