Parent

Methods

Class/Module Index [+]

Quicksearch

Mongoid::Errors::NoParent

This error is raised when trying to persist an embedded document when there is no parent set.

Public Class Methods

new(klass) click to toggle source

Create the new error.

@example Create the new error.

NoParent.new(klass)

@param [ Class ] klass The class of the embedded document.

@since 3.0.0

# File lib/mongoid/errors/no_parent.rb, line 16
def initialize(klass)
  super(
    compose_message("no_parent", { klass: klass })
  )
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.