def connect_to(name, options = { read: { mode: :primary }})
      self.clients = {
        default: {
          database: name,
          hosts: [ "localhost:27017" ],
          options: options
        }
      }
    end
def connect_to(name, options = { read: { mode: :primary }})
      self.clients = {
        default: {
          database: name,
          hosts: [ "localhost:27017" ],
          options: options
        }
      }
    end
Connect to the provided database name on the default client.

 @note Use only in development or test environments for convenience.

 @example Set the database to connect to.
   config.connect_to("mongoid_test")

 @param [ String ] name The database name.

 @since 3.0.0