mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 14:29:53 +01:00
15 lines
352 B
Ruby
15 lines
352 B
Ruby
class ProfilePictureUploader < BaseUploader
|
|
def default_url(*args)
|
|
"/images/#{[version_name || args.first, 'no_avatar.png'].compact.join('/')}"
|
|
end
|
|
|
|
version :large do
|
|
process resize_to_fit: [500, 500]
|
|
end
|
|
version :medium do
|
|
process resize_to_fit: [256, 256]
|
|
end
|
|
version :small do
|
|
process resize_to_fit: [80, 80]
|
|
end
|
|
end
|