diff options
Diffstat (limited to 'core/config')
-rw-r--r-- | core/config/initializers/load_config.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/config/initializers/load_config.rb b/core/config/initializers/load_config.rb new file mode 100644 index 0000000..b2b0318 --- /dev/null +++ b/core/config/initializers/load_config.rb @@ -0,0 +1,7 @@ +def load_config_file(file) + File.exists?(file) ? YAML.load_file(file)[Rails.env] : {} +end + +defaults = load_config_file("#{Rails.root}/config/defaults.yml") || {} +config = load_config_file("#{Rails.root}/config/config.yml") || {} +APP_CONFIG = defaults.merge(config).with_indifferent_access |