Class: MediumUploader
- Inherits:
-
CarrierWave::Uploader::Base
- Object
- CarrierWave::Uploader::Base
- MediumUploader
- Defined in:
- lib/has_media/uploaders/medium_uploader.rb
Instance Method Summary collapse
- #root ⇒ Object
-
#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:.
Instance Method Details
#root ⇒ Object
15 16 17 |
# File 'lib/has_media/uploaders/medium_uploader.rb', line 15 def root HasMedia.directory_path 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:
9 10 11 12 |
# File 'lib/has_media/uploaders/medium_uploader.rb', line 9 def store_dir type = ActiveSupport::Inflector.underscore(model.class.to_s) "#{HasMedia.directory_path}/#{type}/#{model.id}" end |