1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

count, avarage, maximum, minimum, and sum are defined as public methods in Arel::Expressions

This commit is contained in:
Akira Matsuda 2020-10-02 21:45:18 +09:00
parent 954b8c9600
commit fd9d82a238

View file

@ -283,7 +283,7 @@ module ActiveRecord
end
def operation_over_aggregate_column(column, operation, distinct)
operation == "count" ? column.count(distinct) : column.send(operation)
operation == "count" ? column.count(distinct) : column.public_send(operation)
end
def execute_simple_calculation(operation, column_name, distinct) #:nodoc: