Use an env var for Carrierwave's cache_dir

This commit is contained in:
gregoirenovel 2018-09-04 14:43:03 +02:00
parent e93f57763e
commit b2dc502ed5
4 changed files with 7 additions and 16 deletions

View file

@ -1,9 +1,5 @@
class BaseUploader < CarrierWave::Uploader::Base
def cache_dir
if Rails.env.production?
'/tmp/tps-cache'
else
'/tmp/tps-dev-cache'
end
Rails.application.secrets.carrierwave[:cache_dir]
end
end