]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/application_helper.rb
Serve up paperclip attachments in a cache friendly way
[rails.git] / app / helpers / application_helper.rb
index c7187c31d62e932e94047f52ec222c4d9d221b3c..ce0c5d67bb68d37945d0d42213e92d3ef1f08373 100644 (file)
@@ -106,21 +106,13 @@ module ApplicationHelper
   def user_image(user, options = {})
     options[:class] ||= "user_image"
 
-    if user.image
-      image_tag url_for_file_column(user, "image"), options
-    else
-      image_tag "anon_large.png", options
-    end
+    image_tag user.image.url(:large), options
   end
 
   def user_thumbnail(user, options = {})
     options[:class] ||= "user_thumbnail"
 
-    if user.image
-      image_tag url_for_file_column(user, "image"), options
-    else
-      image_tag "anon_small.png", options
-    end
+    image_tag user.image.url(:small), options
   end
 
   def preferred_editor