summaryrefslogtreecommitdiff
path: root/config/initializers/load_config.rb
blob: b2b0318112f59159098006d503e3d0d2ec7fe3ca (plain)
1
2
3
4
5
6
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