]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user.rb
Improve the diary comments view
[rails.git] / app / models / user.rb
index cc538966348dca7936dcd66061f860dda0d6b10a..9a230898a87779160d1038cac73b1e0ef498b2a3 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, 
+    :default_url => "/assets/:class/:attachment/:style.png",
+    :styles => { :large => "100x100>", :small => "50x50>" }
 
   def self.authenticate(options)
     if options[:username] and options[:password]