mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-30 14:31:12 +00:00
16 lines
347 B
Ruby
16 lines
347 B
Ruby
|
# encoding: utf-8
|
||
|
|
||
|
class AvatarUploader < ImageUploader
|
||
|
# Create different versions of your uploaded files:
|
||
|
process :resize_to_limit => [120, 120]
|
||
|
|
||
|
def store_dir
|
||
|
File.join("local", "avatars")
|
||
|
end
|
||
|
|
||
|
# Provide a default URL as a default if there hasn't been a file uploaded:
|
||
|
def default_url
|
||
|
"/images/icons/noavatar.png"
|
||
|
end
|
||
|
end
|