I want to find all records where a field is not true. The working AR syntax for this is:
Dog.where(:stray => [false, nil])
Is there a less verbose way of querying for 'not true'? It really sucks having to cater for this mysql nuance everywhere.
How about a named scope?
scope :not_stray, where("stray IS NULL OR stray = false")
Then use:
Dog.not_stray
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With