Permalink
Browse files

Authenticated with the db.

  • Loading branch information...
1 parent 50eeb09 commit 23ca74b1660fa3d55cbcd56b18f97b443e551f24 @jonmagic committed Oct 21, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/pdf_archive.rb
View
@@ -20,6 +20,9 @@ def self.root
database = uri.path.gsub('/', '')
MongoMapper.connection = Mongo::Connection.new(uri.host, uri.port, {})
MongoMapper.database = database
+if uri.user.present? && uri.password.present?
+ MongoMapper.database.authenticate(uri.user, uri.password)
+end
# Qu setup
Qu.configure do |c|

0 comments on commit 23ca74b

Please sign in to comment.