mongoid/mongoid — comment on commit 5f57f3d39f6a9fbdca157d7d38443b23d42e73da
File:  line 0
By ahoward:

i've had this in my code for a year

https://gist.github.com/1657500

using 'inspect' in the conditions is much saner that 'is_a?(Array)' as it handles funky nested objects. also

Model.not_found!(conditions)

is extremely useful for triggering 404s in apps. more generally mongoid needs to provide factories for exceptions because doing

raise Mongoid::Some::Error::That::Will::Move::Namspaces.new(custom_message)

is brittle