diff options
author | Graham Turner <turnertgraham@gmail.com> | 2018-04-17 21:56:33 -0400 |
---|---|---|
committer | Graham Turner <turnertgraham@gmail.com> | 2018-04-26 12:41:15 -0400 |
commit | b07b97057fba21cbccca9a81630173a88406175a (patch) | |
tree | a1c38b265b84e65895ded21259e3ed9ec31fd7a1 /activerecord/CHANGELOG.md | |
parent | 2929d165c23f0d3976425a8e70de77847cc4b872 (diff) | |
download | rails-b07b97057fba21cbccca9a81630173a88406175a.tar.gz rails-b07b97057fba21cbccca9a81630173a88406175a.tar.bz2 rails-b07b97057fba21cbccca9a81630173a88406175a.zip |
Loaded associations should not run a new query when size is called
Already loaded associations were running an extra query when `size` was called on the association.
This fix ensures that an extra query is no longer run.
Update tests to use proper methods
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 0d8fa48235..36a3d59784 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,8 @@ +* Ensure `Associations::CollectionAssociation#size` and `Associations::CollectionAssociation#empty?` + use loaded association ids if present. + + *Graham Turner* + * Add support to preload associations of polymorphic associations when not all the records have the requested associations. *Dana Sherson* |