First part of multiple foodcoop installation.

This commit is contained in:
Benjamin Meichsner 2009-03-24 17:01:10 +01:00
parent 3309248865
commit 1c24127928
2 changed files with 35 additions and 2 deletions

View file

@ -1,6 +1,26 @@
raw_config = File.read(RAILS_ROOT + "/config/app_config.yml")
APP_CONFIG = YAML.load(raw_config)[RAILS_ENV].symbolize_keys
module Foodsoft
@@configs = YAML.load(File.read(RAILS_ROOT + "/config/app_config.yml"))
@@databases = YAML.load(File.read(RAILS_ROOT + "/config/database.yml"))
@@env = RAILS_ENV
def set_env(env)
@@env = env
end
def config(rails_env = @@env)
@@configs[rails_env].symbolize_keys
end
def database(rails_env = @@env)
@@databases[rails_env].symbolize_keys
end
extend self
end
# Configuration of the exception_notification plugin
# Mailadresses are set in config/foodsoft.yaml