Exception: Mongoid::Errors::DocumentNotFound
- Defined in:
- lib/mongoid/errors.rb
Overview
Raised when querying the database for a document by a specific id which does not exist.
Instance Method Summary collapse
-
#initialize(klass, identifier) ⇒ DocumentNotFound
constructor
A new instance of DocumentNotFound.
- #message ⇒ Object
Constructor Details
#initialize(klass, identifier) ⇒ DocumentNotFound
Returns a new instance of DocumentNotFound.
7 8 9 |
# File 'lib/mongoid/errors.rb', line 7 def initialize(klass, identifier) @klass, @identifier = klass, identifier end |
Instance Method Details
#message ⇒ Object
10 11 12 |
# File 'lib/mongoid/errors.rb', line 10 def "Document not found for class #{@klass} and id #{@identifier}" end |