retrospring/app/uploaders/profile_header_uploader.rb

16 lines
346 B
Ruby
Raw Normal View History

2020-05-02 18:45:11 +02:00
class ProfileHeaderUploader < BaseUploader
2020-05-02 00:43:46 +02:00
def default_url(*args)
"/images/header/" + [version_name, "no_header.jpg"].compact.join('/')
end
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