class Mongoid::Errors::NoClientDatabase

This error is raised when a client is configured without a database.

Public Class Methods

new(name, config) click to toggle source

Create the new error.

@example Create the new error.

NoClientDatabase.new(:default, {}})

@param [ Symbol, String ] name The db config key. @param [ Hash ] config The hash configuration options.

@since 3.0.0

Calls superclass method
# File lib/mongoid/errors/no_client_database.rb, line 19
def initialize(name, config)
  super(
    compose_message(
      "no_client_database",
      { name: name, config: config }
    )
  )
end