Sha256: 20d36e7ae30e08f23af7f0a465a16319c1c09cbefc8aa53171c9d4e54af388f9
Contents?: true
Size: 357 Bytes
Versions: 15
Compression:
Stored size: 357 Bytes
Contents
require "active_support/concern" module Groupdate module Relation extend ActiveSupport::Concern included do attr_accessor :groupdate_values end def calculate(*args, &block) default_value = [:count, :sum].include?(args[0]) ? 0 : nil Groupdate.process_result(self, super, default_value: default_value) end end end
Version data entries
15 entries across 15 versions & 2 rubygems