Sha256: 8d68a4cb288f202f2fc8553b0a50b9048a662488fa3f142d34afd53075ab877a
Contents?: true
Size: 724 Bytes
Versions: 22
Compression:
Stored size: 724 Bytes
Contents
# frozen_string_literal: true module Decidim module Metrics # Metric manager for User's registries class UsersMetricManage < Decidim::MetricManage def metric_name "users" end private def query @query ||= Decidim::User.where(organization: @organization) .where("deleted_at IS NULL OR deleted_at > ?", end_time) .where("blocked_at IS NULL OR blocked_at > ?", end_time) .confirmed .where("created_at <= ?", end_time) end def quantity @quantity ||= query.where("created_at >= ?", start_time).count end end end end
Version data entries
22 entries across 22 versions & 1 rubygems