This is just a reminder that Rails 5, adds a
Rails 5 also adds an
or method which allows you to join clauses with
OR, but I can't find documentation, only this SO thread (and the pull request).
Obviously these still good demonstrations of how to write the minimum SQL that you need, just wanted to point out that for these common situations, there are now methods available.