Forum: Ruby on Rails Multiple Conditions and ActiveRecord::RecordNotFound

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Paul (Guest)
on 2006-02-15 19:13
(Received via mailing list)
Hey all,

It seems that if I do a Foo.find(:first, :conditions => ["identifier =
?", content_identifier]) and no records are returned then I get the
exception thrown.

When I add a second condition Foo.find(:first, :conditions =>
["identifier = ? AND bar = ?", content_identifier, "1"])

Even though again no records are returned, the exception isn't thrown.

Any ideas? Bug?

Thanks,
Paul
This topic is locked and can not be replied to.