Pass the correct locale to Nominatim.describe_location
authorTom Hughes <tom@compton.nu>
Mon, 27 May 2013 17:06:12 +0000 (18:06 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 27 May 2013 17:06:12 +0000 (18:06 +0100)
app/models/notifier.rb

index 88b255cd4a9455bd92ee87bba23d51246421c4d2..a5092221453c50b93f7016afd72e8580b3c3ec5f 100644 (file)
@@ -133,7 +133,7 @@ class Notifier < ActionMailer::Base
   def note_comment_notification(comment, recipient)
     with_recipient_locale recipient do
       @noteurl = browse_note_url(comment.note, :host => SERVER_URL)
-      @place = Nominatim.describe_location(comment.note.lat, comment.note.lon, 14, @locale)
+      @place = Nominatim.describe_location(comment.note.lat, comment.note.lon, 14, I18n.locale)
       @comment = comment.body
       @owner = recipient == comment.note.author
       @event = comment.event