diff options
author | yui-knk <spiketeika@gmail.com> | 2015-09-23 10:08:46 +0900 |
---|---|---|
committer | yui-knk <spiketeika@gmail.com> | 2015-09-23 10:08:46 +0900 |
commit | 0f6d47d88f1ba771e8c463dcf12ee53cb875454d (patch) | |
tree | 64944f5560be6198aa42819927750ce5f5d485f1 /activerecord/README.rdoc | |
parent | 5e4df5c674a9849839fc10111ba6e88910d945b2 (diff) | |
download | rails-0f6d47d88f1ba771e8c463dcf12ee53cb875454d.tar.gz rails-0f6d47d88f1ba771e8c463dcf12ee53cb875454d.tar.bz2 rails-0f6d47d88f1ba771e8c463dcf12ee53cb875454d.zip |
Fix arguments of `AR::Calculations#sum`
Arguments of `#sum` does not match with other shortcuts methods
(count, average, minimum, and maximum).
This commit fix these two points:
* call `super` with only block arguments
First argument of `super` method, `Enumerable#sum`, is `identity`
and first argument of `AR::Calculations#sum` is `column_name`.
`Enumerable#sum` does not expect `column_name` to be passed.
* Change first argument of `sum` from array arguemnt to single
argument to match other shortcuts methods. When `sum` accept
array arguemnt, user can pass multi arguments and an exception is
raised from `calculate`.
Diffstat (limited to 'activerecord/README.rdoc')
0 files changed, 0 insertions, 0 deletions