]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/user_helper.rb
Load gravatar images over https on https pages
[rails.git] / app / helpers / user_helper.rb
index 55b1d21ab63b89839b754e4ab870b11aa5262bf1..6ef654fda8ebf1719315a46531810677b9d72043 100644 (file)
@@ -61,7 +61,7 @@ module UserHelper
     size = options[:size] || 100
     hash = Digest::MD5::hexdigest(user.email.downcase)
     default_image_url = image_url("users/images/large.png")
-    url = "http://www.gravatar.com/avatar/#{hash}.jpg?s=#{size}&d=#{u(default_image_url)}"
+    url = "#{request.protocol}www.gravatar.com/avatar/#{hash}.jpg?s=#{size}&d=#{u(default_image_url)}"
   end
 
   def user_gravatar_tag(user, options = {})