Exception: Mongoid::Errors::MongoidError
- Defined in:
- lib/mongoid/errors/mongoid_error.rb
Overview
Default parent Mongoid error for all custom errors. This handles the base key for the translations and provides the convenience method for translating the messages.
Direct Known Subclasses
Callback, DocumentNotFound, EagerLoad, InvalidCollection, InvalidDatabase, InvalidField, InvalidFind, InvalidOptions, InvalidTime, InvalidType, MixedRelations, TooManyNestedAttributeRecords, UnsavedDocument, UnsupportedVersion, Validations, MultiParameterAttributes::Errors::AttributeAssignmentError, MultiParameterAttributes::Errors::MultiparameterAssignmentErrors
Constant Summary collapse
- BASE_KEY =
"mongoid.errors.messages"
Instance Method Summary collapse
-
#translate(key, options) ⇒ String
Given the key of the specific error and the options hash, translate the message.