]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user.rb
Don't escape the name - rails will handle it
[rails.git] / app / models / user.rb
index cc538966348dca7936dcd66061f860dda0d6b10a..1f8d326d5dc1c3bf9f66b5fffe3227f5595b8577 100644 (file)
@@ -44,7 +44,9 @@ class User < ActiveRecord::Base
   after_initialize :set_creation_time
   before_save :encrypt_password
 
-  file_column :image, :magick => { :geometry => "100x100>" }
+  has_attached_file :image, :styles => { :thumb => "100x100>" }, 
+    :path => "#{ATTACHMENTS_DIR}/user/image/:id/:filename",
+    :url => "/user/image/:id/:filename"
 
   def self.authenticate(options)
     if options[:username] and options[:password]