Use an env var for Carrierwave's cache_dir
This commit is contained in:
parent
e93f57763e
commit
b2dc502ed5
4 changed files with 7 additions and 16 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue