X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/52be0e81a0d8fb30a635b32f85d4465fc0578067..574407e2baa079c503d1629d96d65b381da2966a:/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]