]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/notifier.rb
Merge remote-tracking branch 'upstream/pull/1652'
[rails.git] / app / models / notifier.rb
index 0ed7071ac770ebb6d60a7ccf09abce56ed84d8ca..8f9e3e2954814e45151632c0ba88ca0db8fa6dfd 100644 (file)
@@ -167,6 +167,7 @@ class Notifier < ActionMailer::Base
 
   def changeset_comment_notification(comment, recipient)
     with_recipient_locale recipient do
+      @to_user = recipient.display_name
       @changeset_url = changeset_url(comment.changeset, :host => SERVER_URL)
       @comment = comment.body
       @owner = recipient == comment.changeset.user
@@ -195,7 +196,7 @@ class Notifier < ActionMailer::Base
   end
 
   def attach_project_logo
-    attachments.inline["logo.png"] = File.read("#{Rails.root}/app/assets/images/osm_logo_30.png")
+    attachments.inline["logo.png"] = File.read(Rails.root.join("app", "assets", "images", "osm_logo_30.png"))
   end
 
   def attach_user_avatar(user)
@@ -207,7 +208,7 @@ class Notifier < ActionMailer::Base
     if image && image.file?
       return image.path(:small)
     else
-      return "#{Rails.root}/app/assets/images/users/images/small.png"
+      return Rails.root.join("app", "assets", "images", "users", "images", "small.png")
     end
   end