Skip to content

Instantly share code, notes, and snippets.

@erkde
erkde / gist:1233435
Created September 21, 2011 21:55
Rake tasks to list, export & import Mongo DB collections
namespace :mongo do
def db_name
Mongoid.database.name
end
def db_connection_options
host, port = Mongoid.database.connection.host_to_try
auths = Mongoid.database.connection.auths