Sha256: 11bc77dba8bed6cf643f1886b6c12f4bdd42057584e988b430873865bc74dd8c
Contents?: true
Size: 668 Bytes
Versions: 25
Compression:
Stored size: 668 Bytes
Contents
# frozen_string_literal: true module Decidim module ParticipatoryProcesses # This query class filters participatory processes given a filter name. # It uses the start and end dates to select the correct processes. class FilteredParticipatoryProcesses < Decidim::Query def initialize(filter = "active") @filter = filter end def query processes = Decidim::ParticipatoryProcess.all case @filter when "all" processes when "past" processes.past when "upcoming" processes.upcoming else processes.active end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems