danbooru_default_config.rb: allow setting boolean options in env vars.

Allow setting e.g. `aws_s3_enabled?` with DANBOORU_AWS_S3_ENABLED="true"
in the .env file.
This commit is contained in:
evazion
2018-04-08 11:24:53 -05:00
parent 4097305e52
commit 5f930630e5

View File

@@ -752,7 +752,7 @@ module Danbooru
end
def method_missing(method, *args)
var = ENV["DANBOORU_#{method.to_s.upcase}"]
var = ENV["DANBOORU_#{method.to_s.upcase.chomp("?")}"]
if var.present?
var