diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-09-23 15:17:46 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-09-23 15:19:56 +0900 |
commit | 908d68718d1626d7a69fd5a06b13fd36dbf507dc (patch) | |
tree | b92cea46327ad959c1f7afc01ed57d419383c86a /activerecord | |
parent | ef7791ca1460fa3382778ad6c49074aa88a9c7f1 (diff) | |
download | rails-908d68718d1626d7a69fd5a06b13fd36dbf507dc.tar.gz rails-908d68718d1626d7a69fd5a06b13fd36dbf507dc.tar.bz2 rails-908d68718d1626d7a69fd5a06b13fd36dbf507dc.zip |
remove warning from Calculations#sum
This removes the following warning.
```
activerecord/lib/active_record/relation/calculations.rb:74: warning: `&' interpreted as argument prefix
```
Diffstat (limited to 'activerecord')
-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 |