Class: DocumentUploader

Inherits:
CarrierWave::Uploader::Base
  • Object
show all
Defined in:
app/uploaders/document_uploader.rb

Overview

Carrierwave uploader for docuemnts.

Instance Method Summary collapse

Instance Method Details

#rootObject



13
14
15
# File 'app/uploaders/document_uploader.rb', line 13

def root
  Rails.root.join 'public/'
end

#store_dirObject

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