summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/application.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/config/application.rb b/config/application.rb
index ec25da5..354127b 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -17,7 +17,11 @@ end
APP_CONFIG = ["defaults.yml", "config.yml"].inject({}) {|config, file|
filepath = File.expand_path(file, File.dirname(__FILE__))
- config.merge(File.exists?(filepath) ? YAML.load_file(filepath)[Rails.env] : {})
+ if File.exists?(filepath) && settings = YAML.load_file(filepath)[Rails.env]
+ config.merge(settings)
+ else
+ config
+ end
}.with_indifferent_access
module LeapWeb