allow nuking of vars via env

This commit is contained in:
Sam 2013-12-20 17:07:08 +11:00
parent 13e1016d73
commit 61a50f1cf6
1 changed files with 2 additions and 1 deletions

View File

@ -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