summaryrefslogtreecommitdiff
path: root/config/initializers/load_config.rb
blob: a3dbc5f0b543173e0ed70b7416a454e41698b7dc (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