X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/29c1bab0e6dcc0f4b302fb06c62a8bf0a35f875c..e70396d70bff53c19e917d303f5b9d8f2abb7a3b:/app/models/user.rb diff --git a/app/models/user.rb b/app/models/user.rb index cc5389663..1f8d326d5 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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]