Retrospring/app/uploaders/profile_picture_uploader.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
352 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)
"/images/#{[version_name || args.first, '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