The original link you submitted is what you want. These methods are mixed with your models, therefore:
class MyModel include MongoMapper::Document connection(Mongo::Connection.new('localhost', 27017)) set_database_name "my_database"
Since this is just Mongo :: Connection, you can use any of the supported options . ( source )
source share