Sha256: c2ed05dbf39c968db2c479709a051d28702126f27c0810c732bcb7ab5405c357

Contents?: true

Size: 688 Bytes

Versions: 74

Compression:

Stored size: 688 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module ParticipatoryProcesses
    module Metrics
      class ParticipatoryProcessesMetricManage < Decidim::MetricManage
        def metric_name
          "participatory_processes"
        end

        private

        def query
          return @query if @query

          @query = Decidim::ParticipatoryProcess.where(organization: @organization)
          @query = @query.where("decidim_participatory_processes.published_at <= ?", end_time)
          @query
        end

        def quantity
          @quantity ||= query.where("decidim_participatory_processes.published_at >= ?", start_time).count
        end
      end
    end
  end
end

Version data entries

74 entries across 74 versions & 1 rubygems

Version Path
decidim-participatory_processes-0.26.8 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb
decidim-participatory_processes-0.27.4 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb
decidim-participatory_processes-0.27.3 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb
decidim-participatory_processes-0.26.7 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb
decidim-participatory_processes-0.26.5 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb
decidim-participatory_processes-0.27.2 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb
decidim-participatory_processes-0.27.1 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb
decidim-participatory_processes-0.26.4 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb
decidim-participatory_processes-0.27.0 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb
decidim-participatory_processes-0.26.3 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb
decidim-participatory_processes-0.27.0.rc2 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb
decidim-participatory_processes-0.27.0.rc1 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb
decidim-participatory_processes-0.26.2 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb
decidim-participatory_processes-0.26.1 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb
decidim-participatory_processes-0.26.0 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb
decidim-participatory_processes-0.26.0.rc2 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb
decidim-participatory_processes-0.26.0.rc1 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb
decidim-participatory_processes-0.25.2 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb
decidim-participatory_processes-0.25.1 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb
decidim-participatory_processes-0.25.0 app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb