method
aggregate_column
v5.2.3 -
Show latest stable
- Class:
ActiveRecord::Calculations
aggregate_column(column_name)private
No documentation available.
# File activerecord/lib/active_record/relation/calculations.rb, line 245
def aggregate_column(column_name)
return column_name if Arel::Expressions === column_name
if @klass.has_attribute?(column_name) || @klass.attribute_alias?(column_name)
@klass.arel_attribute(column_name)
else
Arel.sql(column_name == :all ? "*" : column_name.to_s)
end
end