Sha256: 6c3d141a22c97f39a196b285899ede5c76f17db2221bba13e6e1b2816893514f
Contents?: true
Size: 456 Bytes
Versions: 10
Compression:
Stored size: 456 Bytes
Contents
module LoftAssetFileUploader extend ActiveSupport::Concern included do include CarrierWave::MiniMagick def store_dir "loft/#{ model._number }" end version :_200x150_2x, if: :is_image? do process :resize_to_fill => [400, 300] end version :_40x40_2x, if: :is_image? do process :resize_to_fill => [80, 80] end def is_image? new_file model.is_image? end private :is_image? end end
Version data entries
10 entries across 10 versions & 1 rubygems