method
aggregate_column
v4.2.7 -
Show latest stable
- Class:
ActiveRecord::Calculations
aggregate_column(column_name)private
No documentation available.
# File activerecord/lib/active_record/relation/calculations.rb, line 231
def aggregate_column(column_name)
if @klass.column_names.include?(column_name.to_s)
Arel::Attribute.new(@klass.unscoped.table, column_name)
else
Arel.sql(column_name == :all ? "*" : column_name.to_s)
end
end