Permalink
Browse files

Fix mongo connection info on Heroku

  • Loading branch information...
1 parent d43644e commit 1b4a5a50333544d86a0069e976d85b823eddda9f @joshuaflanagan committed Sep 29, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 app.rb
View
3 app.rb
@@ -17,8 +17,9 @@ class User
end
configure :production do
+ mongo_url = ENV["MONGOHQ_URL"]
uri = URI.parse(mongo_url)
- MongoMapper.connection = Mongo::Connection.from_uri(ENV["MONGOHQ_URL"])
+ MongoMapper.connection = Mongo::Connection.from_uri(mongo_url)
MongoMapper.database = uri.path.gsub(/^\//,'')
end

0 comments on commit 1b4a5a5

Please sign in to comment.