[openstreetmap/openstreetmap-website] Dressed up notification mails (#1401)

Tom Hughes notifications at github.com
Mon Jan 2 23:01:53 UTC 2017


tomhughes commented on this pull request.



>        mail :to => recipient.email, :subject => subject
     end
   end
 
   private
 
+  def user_avatar_file_path(user)
+    image = user.image
+    if image.file?
+      return image.path.sub("/original/", "/small/")
+    else
+      return Rails.root.join("app", "assets", "images", "users", "images", "small.png")
+    end
+  end
+

I suspect your single string version is probably the best option. It shouldn't matter that we're avoiding the asset pipeline give it's all happening server side...

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1401
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20170102/df9ea119/attachment.html>


More information about the rails-dev mailing list