aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2017-12-06 21:33:46 +0200
committerbogdanvlviv <bogdanvlviv@gmail.com>2017-12-14 21:31:59 +0000
commitff214c3715ebb84344812bbc282e15a824321b39 (patch)
tree07536a9e55775a340329c585103375a7a842dc6e /guides
parent7d75599c875b081f63fc292e454b25e8e42eb60e (diff)
downloadrails-ff214c3715ebb84344812bbc282e15a824321b39.tar.gz
rails-ff214c3715ebb84344812bbc282e15a824321b39.tar.bz2
rails-ff214c3715ebb84344812bbc282e15a824321b39.zip
Update "Active Record Associations" guide [ci skip]
- Make all `ActiveRecord::Base.find` as link - Remove redundant sentences "It also adds the additional condition that the object must be in the collection."
Diffstat (limited to 'guides')
-rw-r--r--guides/source/association_basics.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/guides/source/association_basics.md b/guides/source/association_basics.md
index 9616647f15..b5e236b790 100644
--- a/guides/source/association_basics.md
+++ b/guides/source/association_basics.md
@@ -1561,7 +1561,8 @@ The `collection.size` method returns the number of objects in the collection.
##### `collection.find(...)`
-The `collection.find` method finds objects within the collection. It uses the same syntax and options as `ActiveRecord::Base.find`.
+The `collection.find` method finds objects within the collection. It uses the same syntax and options as
+[`ActiveRecord::Base.find`](http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find).
```ruby
@available_book = @author.books.find(1)
@@ -2091,7 +2092,8 @@ The `collection.size` method returns the number of objects in the collection.
##### `collection.find(...)`
-The `collection.find` method finds objects within the collection. It uses the same syntax and options as `ActiveRecord::Base.find`. It also adds the additional condition that the object must be in the collection.
+The `collection.find` method finds objects within the collection. It uses the same syntax and options as
+[`ActiveRecord::Base.find`](http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find).
```ruby
@assembly = @part.assemblies.find(1)
@@ -2099,7 +2101,7 @@ The `collection.find` method finds objects within the collection. It uses the sa
##### `collection.where(...)`
-The `collection.where` method finds objects within the collection based on the conditions supplied but the objects are loaded lazily meaning that the database is queried only when the object(s) are accessed. It also adds the additional condition that the object must be in the collection.
+The `collection.where` method finds objects within the collection based on the conditions supplied but the objects are loaded lazily meaning that the database is queried only when the object(s) are accessed.
```ruby
@new_assemblies = @part.assemblies.where("created_at > ?", 2.days.ago)