mirror of
https://github.com/diaspora/diaspora.git
synced 2026-04-29 03:01:03 -04:00
RS IZ if yaml fails to load (empty config) file load the example
This commit is contained in:
@@ -4,6 +4,12 @@
|
||||
|
||||
raw_config = File.read("#{Rails.root}/config/app_config.yml")
|
||||
all_envs = YAML.load(raw_config)
|
||||
|
||||
unless all_envs
|
||||
raw_config = File.read("#{Rails.root}/config/app_config_example.yml")
|
||||
all_envs = YAML.load(raw_config)
|
||||
end
|
||||
|
||||
if all_envs[Rails.env]
|
||||
APP_CONFIG = all_envs['default'].merge(all_envs[Rails.env]).symbolize_keys
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user