Class: Spina::LogoUploader
- Inherits:
-
CarrierWave::Uploader::Base
- Object
- CarrierWave::Uploader::Base
- Spina::LogoUploader
- Includes:
- CarrierWave::MiniMagick
- Defined in:
- app/uploaders/spina/logo_uploader.rb
Instance Method Summary collapse
Instance Method Details
#extension_white_list ⇒ Object
18 19 20 |
# File 'app/uploaders/spina/logo_uploader.rb', line 18 def extension_white_list %w(jpg jpeg gif png) end |
#store_dir ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/uploaders/spina/logo_uploader.rb', line 8 def store_dir if Engine.config.storage == :s3 "#{mounted_as}/#{model.id}" else "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" end end |