Set specific cache path regarding environment

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

View file

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

View file

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

View file

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