diff options
author | Scott Antipa <scottantipa@gmail.com> | 2016-08-20 08:43:22 -0700 |
---|---|---|
committer | Scott Antipa <scottantipa@gmail.com> | 2016-08-21 11:17:37 -0700 |
commit | f3626c38fce4bb2fe3478366abc5a17b9880bb37 (patch) | |
tree | 41894f59b43ccfc090bc11ffe9340660fb4e374f /guides | |
parent | 3e2be0bf144b85fcd3bd0717f56609074d8182ea (diff) | |
download | rails-f3626c38fce4bb2fe3478366abc5a17b9880bb37.tar.gz rails-f3626c38fce4bb2fe3478366abc5a17b9880bb37.tar.bz2 rails-f3626c38fce4bb2fe3478366abc5a17b9880bb37.zip |
Update docs for query interface to not declare that all methods return instance of ActiveRecord::Relation
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/active_record_querying.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index 6f941d0e4e..0601c05e4b 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -84,7 +84,7 @@ The methods are: * `distinct` * `where` -All of the above methods return an instance of `ActiveRecord::Relation`. +Finder methods that return a collection, such as `where` and `group`, return an instance of `ActiveRecord::Relation`. Methods that find a single entity, such as `find` and `first`, return a single instance of the model. The primary operation of `Model.find(options)` can be summarized as: @@ -1251,9 +1251,9 @@ articles, all the articles would still be loaded. By using `joins` (an INNER JOIN), the join conditions **must** match, otherwise no records will be returned. -NOTE: If an association is eager loaded as part of a join, any fields from a custom select clause will not present be on the loaded models. +NOTE: If an association is eager loaded as part of a join, any fields from a custom select clause will not present be on the loaded models. This is because it is ambiguous whether they should appear on the parent record, or the child. - + Scopes ------ |