From 61a50f1cf6f25079b1dad97655b7b7cf2a7f3b91 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 20 Dec 2013 17:07:08 +1100 Subject: [PATCH] allow nuking of vars via env --- app/models/global_setting.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/global_setting.rb b/app/models/global_setting.rb index 01ee1ff1ecf..c9de7b2b280 100644 --- a/app/models/global_setting.rb +++ b/app/models/global_setting.rb @@ -66,7 +66,8 @@ class GlobalSetting class EnvProvider < BaseProvider def lookup(key, default) - resolve(ENV["DISCOURSE_" << key.to_s.upcase], default) + var = ENV["DISCOURSE_" << key.to_s.upcase] + resolve(var , var.nil? ? default : nil) end end