Ruby has many nice methods for checking an objects existence. Rails extends those to be even more expressive.
But they don’t all behave the same way, and some are more suited for certain tasks than others. Understanding how these work can beat back the bugs and clarify your code.
Here’s a quick run down of your options, as examples from the interactive ruby terminal, IRb:
So the question is: What to use?
The answer is the same as always. Use what gives your code the most clarity.