Skip to content

Commit 1b0ef05

Browse files
authored
Merge pull request rails#53839 from mrhead/guides--counter-cache-typo
[ci skip] Fix a typo in the AR associations guide
2 parents 59566ca + 12ff3ea commit 1b0ef05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guides/source/association_basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3110,7 +3110,7 @@ class Author < ApplicationRecord
31103110
end
31113111
```
31123112

3113-
By default, querying `@auth books.size` results in a database call to perform a
3113+
By default, querying `author.books.size` results in a database call to perform a
31143114
`COUNT(*)` query. To optimize this, you can add a counter cache to the
31153115
_belonging_ model (in this case, `Book`). This way, Rails can return the count
31163116
directly from the cache without querying the database.

0 commit comments

Comments
 (0)