diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2015-09-23 09:07:20 +0200 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2015-09-23 09:07:20 +0200 |
commit | 1e9593a37cb9564d85bbb552b08c1084d35523fc (patch) | |
tree | b92cea46327ad959c1f7afc01ed57d419383c86a /activerecord/lib | |
parent | ef7791ca1460fa3382778ad6c49074aa88a9c7f1 (diff) | |
parent | 908d68718d1626d7a69fd5a06b13fd36dbf507dc (diff) | |
download | rails-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.rb | 2 |
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 |