Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #9194 from kwstannard/2-3-stable

Docs: Fixed bad exists? documentation.
  • Loading branch information...
commit 2e4aa39ee6cd56b8d544fda01670f5a48548f13e 2 parents c774a46 + d61f83d
@fxn fxn authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 railties/guides/source/active_record_querying.textile
View
5 railties/guides/source/active_record_querying.textile
@@ -867,10 +867,11 @@ Client.exists?(1,2,3)
Client.exists?([1,2,3])
</ruby>
-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:
<ruby>
-Client.exists?(:conditions => "first_name = 'Ryan'")
+Client.exists?(:first_name => 'Ryan')
+Client.exists?(['first_name = ?', 'Ryan'])
</ruby>
It's even possible to use +exists?+ without any arguments:
Please sign in to comment.
Something went wrong with that request. Please try again.