RubyFlow The Ruby and Rails community linklog

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

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in