Set specific cache path regarding environment

This commit is contained in:
Guillaume Lazzara 2016-06-07 10:32:21 +02:00
parent 32870e8128
commit 0c67cda7c5
3 changed files with 15 additions and 3 deletions

View file

@ -19,7 +19,11 @@ class CerfaUploader < CarrierWave::Uploader::Base
end
def cache_dir
'/tmp/tps-cache'
if Rails.env.production?
'/tmp/tps-cache'
else
'/tmp/tps-dev-cache'
end
end
# Add a white list of extensions which are allowed to be uploaded.

View file

@ -19,7 +19,11 @@ class PieceJustificativeUploader < CarrierWave::Uploader::Base
end
def cache_dir
'/tmp/tps-cache'
if Rails.env.production?
'/tmp/tps-cache'
else
'/tmp/tps-dev-cache'
end
end
# Add a white list of extensions which are allowed to be uploaded.

View file

@ -22,7 +22,11 @@ class ProcedureLogoUploader < CarrierWave::Uploader::Base
end
def cache_dir
'/tmp/tps-cache'
if Rails.env.production?
'/tmp/tps-cache'
else
'/tmp/tps-dev-cache'
end
end
# Add a white list of extensions which are allowed to be uploaded.