Method: AttachmentUploader#store_dir

Defined in:
app/uploaders/attachment_uploader.rb

#store_dirObject

Override the directory where uploaded files will be stored. This is a sensible default for uploaders that are meant to be mounted:



22
23
24
25
# File 'app/uploaders/attachment_uploader.rb', line 22

def store_dir
  model.id || raise('Model has no id. But need one to save the file.')
  "#{Rails.root}/uploads/#{Rails.env}_env/#{model.class.to_s.underscore}s/#{model.id}"
end