aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-17 19:08:07 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-21 22:21:01 -0200
commitad9983f625ea414c5b7bbc0fd12be17ec04fc590 (patch)
tree352c4e140b1d689ad37ce6e4099eff9d7f061c56 /activerecord/CHANGELOG.md
parent76a6bfd6c8dc9e3c27779a39b3e04402e20f0eaa (diff)
downloadrails-ad9983f625ea414c5b7bbc0fd12be17ec04fc590.tar.gz
rails-ad9983f625ea414c5b7bbc0fd12be17ec04fc590.tar.bz2
rails-ad9983f625ea414c5b7bbc0fd12be17ec04fc590.zip
Deprecate Relation#sum with a block.
To perform a sum calculation over the array of elements, use to_a.sum(&block). Please check the discussion in f9cb645dfcb5cc89f59d2f8b58a019486c828c73 for more context.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 22e57a6774..e3ed3780db 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,5 +1,10 @@
## Rails 4.0.0 (unreleased) ##
+* Deprecate calling `Relation#sum` with a block. To perform a calculation over
+ the array result of the relation, use `to_a.sum(&block)`.
+
+ *Carlos Antonio da Silva*
+
* Fix postgresql adapter to handle BC timestamps correctly
HistoryEvent.create!(:name => "something", :occured_at => Date.new(0) - 5.years)