aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2015-09-23 09:07:20 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2015-09-23 09:07:20 +0200
commit1e9593a37cb9564d85bbb552b08c1084d35523fc (patch)
treeb92cea46327ad959c1f7afc01ed57d419383c86a /activerecord/lib
parentef7791ca1460fa3382778ad6c49074aa88a9c7f1 (diff)
parent908d68718d1626d7a69fd5a06b13fd36dbf507dc (diff)
downloadrails-1e9593a37cb9564d85bbb552b08c1084d35523fc.tar.gz
rails-1e9593a37cb9564d85bbb552b08c1084d35523fc.tar.bz2
rails-1e9593a37cb9564d85bbb552b08c1084d35523fc.zip
Merge pull request #21729 from y-yagi/fix_warning_in_ar
remove warning from Calculations#sum
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/relation/calculations.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb
index 922cbc05eb..c562bd9ce4 100644
--- a/activerecord/lib/active_record/relation/calculations.rb
+++ b/activerecord/lib/active_record/relation/calculations.rb
@@ -71,7 +71,7 @@ module ActiveRecord
#
# Person.sum(:age) # => 4562
def sum(column_name = nil, &block)
- return super &block if block_given?
+ return super(&block) if block_given?
calculate(:sum, column_name)
end