Rails Active Records - where, where-not and nil
Today my coworker pointed out that confusing behavior of where.not query dealing with nil. We need extra care when filtering SQL queries with nil. I'll put it together for future reference. all records User.all.count #=> 1509 nil | non-nil Records ...
Jan 11, 20192 min read147