Retrospring/app/uploaders/profile_picture_uploader.rb

16 lines
338 B
Ruby
Raw Normal View History

2020-05-02 09:45:11 -07:00
class ProfilePictureUploader < BaseUploader
2020-05-01 15:43:46 -07:00
def default_url(*args)
2020-05-02 05:04:23 -07:00
"/images/" + [version_name, "no_avatar.png"].compact.join('/')
2020-05-01 15:43:46 -07:00
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