diff --git a/railties/guides/source/active_record_querying.textile b/railties/guides/source/active_record_querying.textile index 442521cbf4c43a6cee739cce767cdfd863393224..43be8075f8021ca1cec04d88c15bcad6f565090f 100644 --- a/railties/guides/source/active_record_querying.textile +++ b/railties/guides/source/active_record_querying.textile @@ -867,10 +867,11 @@ Client.exists?(1,2,3) Client.exists?([1,2,3]) -Further more, +exists+ takes a +conditions+ option much like find: +Further more, +exists+ takes a hash or array like what you would pass into a +conditions+ option: -Client.exists?(:conditions => "first_name = 'Ryan'") +Client.exists?(:first_name => 'Ryan') +Client.exists?(['first_name = ?', 'Ryan']) It's even possible to use +exists?+ without any arguments: