]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/application_helper.rb
Replace the file_column plugin with paperclip
[rails.git] / app / helpers / application_helper.rb
index c7187c31d62e932e94047f52ec222c4d9d221b3c..2d78a5bf47720ce642ab6e877a6c17cd2887261a 100644 (file)
@@ -106,8 +106,8 @@ module ApplicationHelper
   def user_image(user, options = {})
     options[:class] ||= "user_image"
 
-    if user.image
-      image_tag url_for_file_column(user, "image"), options
+    if user.image.file?
+      image_tag user.image.url, options
     else
       image_tag "anon_large.png", options
     end
@@ -116,8 +116,8 @@ module ApplicationHelper
   def user_thumbnail(user, options = {})
     options[:class] ||= "user_thumbnail"
 
-    if user.image
-      image_tag url_for_file_column(user, "image"), options
+    if user.image.file?
+      image_tag user.image.url, options
     else
       image_tag "anon_small.png", options
     end