Sha256: 9ac919c17645e7fa34c4bdb7031747fb03481f317f7864bfcb2cd2596f90e6bc
Contents?: true
Size: 488 Bytes
Versions: 17
Compression:
Stored size: 488 Bytes
Contents
module Groupdate module QueryMethods Groupdate::PERIODS.each do |period| define_method :"group_by_#{period}" do |field, **options| Groupdate::Magic::Relation.generate_relation(self, period: period, field: field, **options ) end end def group_by_period(period, field, permit: nil, **options) Groupdate::Magic.validate_period(period, permit) send("group_by_#{period}", field, **options) end end end
Version data entries
17 entries across 17 versions & 2 rubygems