Flowdock
method

calculate

Importance_0
v5.2.3 - 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 45
    def calculate(operation, _column_name)
      case operation
      when :count, :sum
        group_values.any? ? Hash.new : 0
      when :average, :minimum, :maximum
        group_values.any? ? Hash.new : nil
      end
    end
Register or log in to add new notes.