Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated env vars to match the mongoid documentation

  • Loading branch information...
commit 7711205a66af59f78a0ed385db0f495ac6a4cf5f 1 parent 1139d33
@portertech portertech authored committed
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/sinatra/mongoid.rb
View
10 lib/sinatra/mongoid.rb
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.