1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Clarify exists? and find query only in the table

This commit is contained in:
Alan Savage 2020-08-28 10:17:47 -07:00 committed by Alan Savage
parent 7101489293
commit 262137441a

View file

@ -1614,7 +1614,7 @@ The `collection.size` method returns the number of objects in the collection.
##### `collection.find(...)` ##### `collection.find(...)`
The `collection.find` method finds objects within the collection. It uses the same syntax and options as The `collection.find` method finds objects within the collection's table. It uses the same syntax and options as
[`ActiveRecord::Base.find`](https://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find). [`ActiveRecord::Base.find`](https://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find).
```ruby ```ruby
@ -1633,7 +1633,7 @@ The `collection.where` method finds objects within the collection based on the c
##### `collection.exists?(...)` ##### `collection.exists?(...)`
The `collection.exists?` method checks whether an object meeting the supplied The `collection.exists?` method checks whether an object meeting the supplied
conditions exists in the collection. It uses the same syntax and options as conditions exists in the collection's table. It uses the same syntax and options as
[`ActiveRecord::Base.exists?`](https://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-exists-3F). [`ActiveRecord::Base.exists?`](https://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-exists-3F).
##### `collection.build(attributes = {}, ...)` ##### `collection.build(attributes = {}, ...)`
@ -2161,7 +2161,7 @@ The `collection.size` method returns the number of objects in the collection.
##### `collection.find(...)` ##### `collection.find(...)`
The `collection.find` method finds objects within the collection. It uses the same syntax and options as The `collection.find` method finds objects within the collection's table. It uses the same syntax and options as
[`ActiveRecord::Base.find`](https://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find). [`ActiveRecord::Base.find`](https://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find).
```ruby ```ruby
@ -2179,7 +2179,7 @@ The `collection.where` method finds objects within the collection based on the c
##### `collection.exists?(...)` ##### `collection.exists?(...)`
The `collection.exists?` method checks whether an object meeting the supplied The `collection.exists?` method checks whether an object meeting the supplied
conditions exists in the collection. It uses the same syntax and options as conditions exists in the collection's table. It uses the same syntax and options as
[`ActiveRecord::Base.exists?`](https://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-exists-3F). [`ActiveRecord::Base.exists?`](https://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-exists-3F).
##### `collection.build(attributes = {})` ##### `collection.build(attributes = {})`