Retrospring/app/uploaders/profile_header_uploader.rb

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

16 lines
397 B
Ruby
Raw Normal View History

2020-05-02 09:45:11 -07:00
class ProfileHeaderUploader < BaseUploader
2023-12-17 14:09:35 -08:00
def default_url(*args) = "/images/header/#{[version_name || args.first, 'no_header.jpg'].compact.join('/')}"
def size_range = (1.byte)..(10.megabytes)
2020-05-01 15:43:46 -07:00
version :web do
process resize_to_fit: [1500, 350]
end
version :mobile do
process resize_to_fit: [450, 105]
end
version :retina do
process resize_to_fit: [900, 210]
end
end