Commit 4c86d517c990140ddeb27af56dc7f43df2840f69

Authored by Jared Pace
1 parent bab575a0
Exists in master and in 1 other branch production

Add a configuration class

config/config.yml 0 → 100644
... ... @@ -0,0 +1 @@
  1 +email_at_notices: [1, 10, 100]
0 2 \ No newline at end of file
... ...
config/initializers/load_config.rb 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +require 'ostruct'
  2 +
  3 +yaml = File.read(Rails.root.join('config','config.yml'))
  4 +config = YAML.load(yaml)
  5 +
  6 +config.merge!(config.delete(Rails.env)) if config.has_key?(Rails.env)
  7 +
  8 +::App = OpenStruct.new(config)
0 9 \ No newline at end of file
... ...