Flowdock
method

calculate

Importance_0
v5.0.0.1 - Show latest stable - 0 notes - Class: NullRelation
calculate(operation, _column_name) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/null_relation.rb, line 71
    def calculate(operation, _column_name)
      if [:count, :sum, :size].include? operation
        group_values.any? ? Hash.new : 0
      elsif [:average, :minimum, :maximum].include?(operation) && group_values.any?
        Hash.new
      else
        nil
      end
    end
Register or log in to add new notes.