Skip to content

Commit ad59260

Browse files
caikecarlosantoniodasilva
authored andcommitted
Update AR Changelog with correct example using includes
These queries don't seem to work without the includes clause. [ci skip]
1 parent 69163cc commit ad59260

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

activerecord/CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,11 +1113,11 @@
11131113
Note that you do not need to explicitly specify references in the
11141114
following cases, as they can be automatically inferred:
11151115

1116-
Post.where(comments: { name: 'foo' })
1117-
Post.where('comments.name' => 'foo')
1118-
Post.order('comments.name')
1116+
Post.includes(:comments).where(comments: { name: 'foo' })
1117+
Post.includes(:comments).where('comments.name' => 'foo')
1118+
Post.includes(:comments).order('comments.name')
11191119

1120-
You also do not need to worry about this unless you are doing eager
1120+
You do not need to worry about this unless you are doing eager
11211121
loading. Basically, don't worry unless you see a deprecation warning
11221122
or (in future releases) an SQL error due to a missing JOIN.
11231123

0 commit comments

Comments
 (0)