Permalink
Browse files

updated env vars to match the mongoid documentation

  • Loading branch information...
1 parent 1139d33 commit 7711205a66af59f78a0ed385db0f495ac6a4cf5f @portertech portertech committed with Jun 8, 2010
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/sinatra/mongoid.rb
View
@@ -4,11 +4,11 @@
module Sinatra
module MongoidExtension
def self.registered(app)
- app.set :mongo_host, ENV['MONGO_HOST'] || 'localhost'
- app.set :mongo_db, ENV['MONGO_DB'] || 'changeme'
- app.set :mongo_port, ENV['MONGO_PORT'] || Mongo::Connection::DEFAULT_PORT
- app.set :mongo_user, ENV['MONGO_USER']
- app.set :mongo_password, ENV['MONGO_PASSWORD']
+ app.set :mongo_host, ENV['MONGOID_HOST'] || 'localhost'
+ app.set :mongo_db, ENV['MONGOID_DATABASE'] || 'changeme'
+ app.set :mongo_port, ENV['MONGOID_PORT'] || Mongo::Connection::DEFAULT_PORT
+ app.set :mongo_user, ENV['MONGOID_USERNAME']
+ app.set :mongo_password, ENV['MONGOID_PASSWORD']
Mongoid.database = Mongo::Connection.new(app.mongo_host,app.mongo_port).
db(app.mongo_db)

0 comments on commit 7711205

Please sign in to comment.