Permalink
Browse files

Altered config.yml to add more flexibility for future options

  • Loading branch information...
1 parent a678f65 commit cbef2e6bfc1ffd8a90de904552232ddaca2f8cd1 @skalnik committed Oct 25, 2009
Showing with 5 additions and 4 deletions.
  1. +2 −2 app.rb
  2. +3 −2 config.yml
View
4 app.rb
@@ -8,8 +8,8 @@
configure do
config = YAML::load(File.open('config.yml'))
- MongoMapper.connection = XGen::Mongo::Driver::Connection.new(config['host'])
- MongoMapper.database = config['database']
+ MongoMapper.connection = XGen::Mongo::Driver::Connection.new(config['database']['host'])
+ MongoMapper.database = config['database']['name']
end
helpers do
View
5 config.yml
@@ -1,2 +1,3 @@
-host: localhost
-database: mango
+database:
+ host: localhost
+ name: mango

0 comments on commit cbef2e6

Please sign in to comment.