Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Client.exists?(1,2,3) and Client.exists?([1,2,3]) does not work

The right command for doing that is Client.exists?id:[1,2,3]
Exists does not work like find method, in find method you can do Person.find(1, 2, 6) or Person.find([7, 17]) but not Person.exists?(1,2,3) or Person.exists?([1,2,3])
  • Loading branch information...
commit 90155b4e28a3887dce9428e9df150ede3d6c7465 1 parent 67d88b5
@shernade shernade authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 guides/source/active_record_querying.md
View
6 guides/source/active_record_querying.md
@@ -1514,9 +1514,9 @@ Client.exists?(1)
The `exists?` method also takes multiple ids, but the catch is that it will return true if any one of those records exists.
```ruby
-Client.exists?(1,2,3)
-# or
-Client.exists?([1,2,3])
+Client.exists?id:[1,2,3]
+or
+Client.exists?name:['John','Sergei']
```
It's even possible to use `exists?` without any arguments on a model or a relation.
Please sign in to comment.
Something went wrong with that request. Please try again.