Exception: Mongoid::Errors::MixedSessionConfiguration

Inherits:
MongoidError
  • Object
show all
Defined in:
lib/mongoid/errors/mixed_session_configuration.rb

Overview

This error is raised when a session configuration contains both a uri and other standard options.

Constant Summary

Constants inherited from MongoidError

Mongoid::Errors::MongoidError::BASE_KEY

Instance Method Summary collapse

Methods inherited from MongoidError

#compose_message

Constructor Details

#initialize(name, config) ⇒ MixedSessionConfiguration

Initialize the error.

Examples:

Initialize the error.

MixedSessionConfiguration.new(:name, {})

Parameters:

  • name (Symbol)

    The name of the session config.

  • config (Hash)

    The configuration options.

Since:

  • 3.0.0



18
19
20
21
22
23
24
25
# File 'lib/mongoid/errors/mixed_session_configuration.rb', line 18

def initialize(name, config)
  super(
    compose_message(
      "mixed_session_configuration",
      { name: name, config: config }
    )
  )
end