-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
The Mongoid::Errors::DocumentNotFound error has a attribute reader for params (the parameters used to unsuccessfully find the document(s)) but that attribute is not being set.
To fix just need to add the @params = params line to document_not_found.rb:23:
ruby if !unmatched && !params.is_a?(Hash) raise ArgumentError, 'please also supply the unmatched ids' end @params = params
It would be nice if it stored the klass in an attribute too so that from the exception I can generate my own error which contains info about the error and generate a 404 page.