Class: Dunlop::SourceFileUploader

Inherits:
CarrierWave::Uploader::Base
  • Object
show all
Defined in:
app/models/dunlop/source_file_uploader.rb

Instance Method Summary collapse

Instance Method Details

#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
12
13
14
15
16
# File 'app/models/dunlop/source_file_uploader.rb', line 9

def store_dir
  File.join(
    Rails.application.config.file_storage_path,
    model.class.to_s.underscore,
    mounted_as.to_s,
    model.id.to_s
  )
end