Class: DocumentUploader

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

Instance Method Summary collapse

Instance Method Details

#cache_dirObject



11
12
13
# File 'app/uploaders/document_uploader.rb', line 11

def cache_dir
	Rails.root.join 'tmp/uploads'
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:



7
8
9
# File 'app/uploaders/document_uploader.rb', line 7

def store_dir
	"#{Rails.root}/uploads/#{model.class.to_s.underscore}/#{model.id}"
end