diff options
author | jessib <jessib@riseup.net> | 2013-04-08 11:04:01 -0700 |
---|---|---|
committer | jessib <jessib@riseup.net> | 2013-04-08 11:04:01 -0700 |
commit | 176845b45f6982b0bf26aa69e7432562eed97c69 (patch) | |
tree | 1dd74d5afcdb8cfb96588937eda612b37449923c /core | |
parent | 602229c463c58be9ffb909570155d14d59f6b4d5 (diff) | |
parent | 654ab25fa4659119d5ddaa9ae116fce69a386ab1 (diff) |
Merge pull request #41 from azul/feature/allow-getting-salt
Allow getting salt and proper error messages for invalid login attempts
Diffstat (limited to 'core')
-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 |