How to chain scope queries with OR instead of AND?

You would do

Person.where('name=? OR lastname=?', 'John', 'Smith')

Right now, there isn’t any other OR support by the new AR3 syntax (that is without using some 3rd party gem).

Leave a Comment