class Mongoid::Errors::InverseNotFound

Raised when no inverse_of definition can be found when needed.

def initialize(base, name, klass, inverse)

Other tags:
    Since: - 3.0.0

Parameters:
  • inverse (Symbol) -- The attempted inverse key.
  • The (Class) -- child class.
  • name (Symbol) -- The name of the relation.
  • base (Class) -- The base class.

Other tags:
    Example: Create the new error. -
def initialize(base, name, klass, inverse)
  super(
    compose_message(
      "inverse_not_found",
      { base: base, name: name, klass: klass, inverse: inverse }
    )
  )
end