Sha256: 19d9622afcdb022042645696561984d2eb49bbcebfcf0ebac0b5663d4692ee52
Contents?: true
Size: 710 Bytes
Versions: 41
Compression:
Stored size: 710 Bytes
Contents
# frozen_string_literal: true module Decidim module ParticipatoryProcesses # A class used to find the ParticipatoryProcesses from a ProcessGroup. class ParticipatoryProcessesByGroup < Rectify::Query # Syntactic sugar to initialize the class and return the queried objects. def self.for(process_group) new(process_group).query end # Initializes the class. def initialize(process_group) @process_group = process_group end def processes ParticipatoryProcess end def query return processes.all unless @process_group processes.where(participatory_process_group: @process_group) end end end end
Version data entries
41 entries across 41 versions & 1 rubygems