Class: Uploadbox::ImageProcessingUploader
- Inherits:
-
CarrierWave::Uploader::Base
- Object
- CarrierWave::Uploader::Base
- Uploadbox::ImageProcessingUploader
- Includes:
- CarrierWave::MimeTypes, CarrierWave::MiniMagick, CarrierWave::Processing::MiniMagick
- Defined in:
- app/uploaders/uploadbox/image_processing_uploader.rb
Instance Method Summary collapse
Instance Method Details
#extension_white_list ⇒ Object
15 16 17 |
# File 'app/uploaders/uploadbox/image_processing_uploader.rb', line 15 def extension_white_list %w(jpg jpeg gif png) end |
#filename ⇒ Object
19 20 21 22 23 24 25 |
# File 'app/uploaders/uploadbox/image_processing_uploader.rb', line 19 def filename if original_filename extension = File.extname(original_filename) name = File.basename(original_filename, extension).parameterize.dasherize "#{name}#{extension}" end end |
#store_dir ⇒ Object
10 11 12 13 |
# File 'app/uploaders/uploadbox/image_processing_uploader.rb', line 10 def store_dir # "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" "uploads/image/#{mounted_as}/#{model.id}" end |