module ActiveRecord::Calculations::ClassMethods
def sum(column_name, options = {})
+calculate+ for examples with options.
with the same data type of the column, 0 if there's no row. See
Calculates the sum of values on a given column. The value is returned
def sum(column_name, options = {}) calculate(:sum, column_name, options) end