diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-06-19 10:42:57 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-06-19 10:44:43 -0600 |
commit | 7d14bd3ff553d6aba11a50b43773bc21ae20f31e (patch) | |
tree | 8a3f7cd3f5203b948237631adecfdb65618ead48 /activerecord/CHANGELOG.md | |
parent | 40bdf0dd4c1f4425b9a91c5fc8b570d35dfd4d73 (diff) | |
download | rails-7d14bd3ff553d6aba11a50b43773bc21ae20f31e.tar.gz rails-7d14bd3ff553d6aba11a50b43773bc21ae20f31e.tar.bz2 rails-7d14bd3ff553d6aba11a50b43773bc21ae20f31e.zip |
Use `Enumerable#sum` on `ActiveRecord::Relation` when a block is given
This matches our behavior in other cases where useful enumerable methods
might have a different definition in `Relation`. Wanting to actually
enumerate over the records in this case is completely reasonable, and
wanting `.sum` is reasonable for the same reason it is on `Enumerable`
in the first place.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 99c78ad934..aff4982a05 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,7 @@ +* Use `Enumerable#sum` in `ActiveRecord::Relation` if a block is given. + + *Sean Griffin* + * Let `WITH` queries (Common Table Expressions) be explainable. *Vladimir Kochnev* |