Class: Vouchers::PhotoUploader
- Inherits:
-
CarrierWave::Uploader::Base
- Object
- CarrierWave::Uploader::Base
- Vouchers::PhotoUploader
- Defined in:
- app/uploaders/vouchers/photo_uploader.rb
Instance Method Summary collapse
- #cache_dir ⇒ Object
- #extension_white_list ⇒ Object
-
#store_dir ⇒ Object
Override the directory where uploaded files will be stored.
Instance Method Details
#cache_dir ⇒ Object
27 28 29 |
# File 'app/uploaders/vouchers/photo_uploader.rb', line 27 def cache_dir "system/uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" end |
#extension_white_list ⇒ Object
5 6 7 |
# File 'app/uploaders/vouchers/photo_uploader.rb', line 5 def extension_white_list %w(jpg jpeg gif png) end |
#store_dir ⇒ Object
Override the directory where uploaded files will be stored. This is a sensible default for uploaders that are meant to be mounted:
23 24 25 |
# File 'app/uploaders/vouchers/photo_uploader.rb', line 23 def store_dir "system/uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" end |