Parent

Methods

Class/Module Index [+]

Quicksearch

Mongoid::Errors::Validations

Raised when a persistence method ending in ! fails validation. The message will contain the full error messages from the Document in question.

@example Create the error.

Validations.new(person.errors)

Attributes

document[R]

Public Class Methods

new(document) click to toggle source
# File lib/mongoid/errors/validations.rb, line 11
def initialize(document)
  @document = document
  super(
    translate(
      "validations",
      { :errors => document.errors.full_messages.join(", ") }
    )
  )
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.