find vs exists?
How about if we try to find a document with the given criteria in Mongoid but it was not found and an error got raised? We just wanted to the return to be either true or false. We should not change any configuration, instead we should change our query itself. Lets find out.
Read more: https://atul1bhosale.wordpress.com/2016/09/30/find-vs-exists-in-rails/
Post a comment