Made multi coop installation available as an option in app_config.yml.

This commit is contained in:
Benjamin Meichsner 2009-08-13 16:32:38 +02:00
parent f4edfacd91
commit fd97c1fc60
4 changed files with 16 additions and 9 deletions

View file

@ -1,6 +1,10 @@
# Foodsoft configuration
development: &defaults
# If you wanna serve more than one foodcoop with one installation
# Don't forget to setup databases for each foodcoop. See also MULTI_COOP_INSTALL
multi_coop_install: false
# name of this foodcoop
name: FC Test
# foodcoop contact information (used for FAX messages)

View file

@ -13,10 +13,12 @@ module Foodsoft
end
def config(rails_env = @@env)
raise "No config for this environment (or subdomain) available!" if @@configs[rails_env].nil?
@@configs[rails_env].symbolize_keys
end
def database(rails_env = @@env)
raise "No database for this environment (or subdomain) available!" if @@databases[rails_env].nil?
@@databases[rails_env].symbolize_keys
end