diff options
author | Brian Christian <brchristian@gmail.com> | 2018-01-09 11:28:30 -0800 |
---|---|---|
committer | Brian Christian <brchristian@gmail.com> | 2018-01-09 11:28:30 -0800 |
commit | b75a67cdef06cbf0a5a4feb1be9c74f31b89b28a (patch) | |
tree | b58b6b49c5abc95983b1885df1663d63fb44c399 /activerecord/CHANGELOG.md | |
parent | baa88b8ddff59b10b8e98eeee7503e2416da8abe (diff) | |
download | rails-b75a67cdef06cbf0a5a4feb1be9c74f31b89b28a.tar.gz rails-b75a67cdef06cbf0a5a4feb1be9c74f31b89b28a.tar.bz2 rails-b75a67cdef06cbf0a5a4feb1be9c74f31b89b28a.zip |
resolve inconsistencies between first and to_a.first with limit
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index cbbfad615d..167bd8c82c 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,11 @@ +* Fixed inconsistency with `first(n)` when used with `limit()`. + The `first(n)` finder now respects the `limit()`, making it consistent + with `relation.to_a.first(n)`, and also with the behavior of `last(n)`. + + Fixes #23979. + + *Brian Christian* + * Use `count(:all)` in `HasManyAssociation#count_records` to prevent invalid SQL queries for association counting. |