demarches-normaliennes/app/uploaders/commentaire_file_uploader.rb
2017-11-28 15:07:09 +01:00

15 lines
274 B
Ruby

class CommentaireFileUploader < BaseUploader
def root
File.join(Rails.root, 'public')
end
if Features.remote_storage
storage :fog
else
storage :file
end
def store_dir
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
end