Forum: Ruby on Rails Table.exists?() returning false

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
80590fe5ca4966dcf4187f33f1d32744?d=identicon&s=25 Oliver Day (oday)
on 2007-02-20 19:58
I'm trying to use the .exists?() method in a rails application to detect
if name='blah' exists in a row or not.  According to the documentation
this would be
 Person.exists?(:name => "David")

However this always returns false for me.  If I only look for the row ID
it works just fine.

I've reverted to a more manual approach but feel like this should work.
Has anyone made this work as documented?  Is this a known bug?

This topic is locked and can not be replied to.