Commit 4c86d517c990140ddeb27af56dc7f43df2840f69
1 parent
bab575a0
Exists in
master
and in
1 other branch
Add a configuration class
Showing
2 changed files
with
9 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,8 @@ | @@ -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 | \ No newline at end of file | 9 | \ No newline at end of file |