a guest Mar 22nd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- class FileUploader < CommonUploader
- def extension_whitelist
- def cover
- manipulate! do |image|
- image.format('png', 0) do |c|
- c.fuzz '3%'
- c.colorspace 'sRGB'
- version :preview do
- process :cover
- process convert: :png
- process resize_to_fit: [200,200]
- def full_filename (for_file = model.source.file)
- super.chomp(File.extname(super)) + '.png'
RAW Paste Data