]> 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 2d78a5bf47720ce642ab6e877a6c17cd2887261a..ce0c5d67bb68d37945d0d42213e92d3ef1f08373 100644 (file)
@@ -106,21 +106,13 @@ module ApplicationHelper
   def user_image(user, options = {})
     options[:class] ||= "user_image"
 
   def user_image(user, options = {})
     options[:class] ||= "user_image"
 
-    if user.image.file?
-      image_tag user.image.url, 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"
 
   end
 
   def user_thumbnail(user, options = {})
     options[:class] ||= "user_thumbnail"
 
-    if user.image.file?
-      image_tag user.image.url, options
-    else
-      image_tag "anon_small.png", options
-    end
+    image_tag user.image.url(:small), options
   end
 
   def preferred_editor
   end
 
   def preferred_editor