I have a rails query:
Model.exists?(where(:x => 1, :y => y, :z => z).first)
This is returning true. The only line in my database has x set to 0, not 1. Is there an explanation for this?
Ninja-edit: I checked and it seems none of the values matter, it always returns true. What’s the reason for this?
I think what you want is more along the lines of