Class: DocumentUploader
- Inherits:
-
CarrierWave::Uploader::Base
- Object
- CarrierWave::Uploader::Base
- DocumentUploader
- Defined in:
- app/uploaders/document_uploader.rb
Overview
Carrierwave uploader for docuemnts.
Instance Method Summary collapse
- #root ⇒ Object
-
#store_dir ⇒ Object
Override the directory where uploaded files will be stored.
Instance Method Details
#root ⇒ Object
13 14 15 |
# File 'app/uploaders/document_uploader.rb', line 13 def root Rails.root.join 'public/' 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 |
# File 'app/uploaders/document_uploader.rb', line 9 def store_dir "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" end |