Class: Decidim::ParticipatoryProcesses::GroupParticipatoryProcesses

Inherits:
Query
  • Object
show all
Defined in:
app/queries/decidim/participatory_processes/group_participatory_processes.rb

Overview

This query class filters all processes of a participatory process group

Instance Method Summary collapse

Constructor Details

#initialize(group) ⇒ GroupParticipatoryProcesses

Returns a new instance of GroupParticipatoryProcesses.



7
8
9
# File 'app/queries/decidim/participatory_processes/group_participatory_processes.rb', line 7

def initialize(group)
  @group = group
end

Instance Method Details

#queryObject



11
12
13
# File 'app/queries/decidim/participatory_processes/group_participatory_processes.rb', line 11

def query
  Decidim::ParticipatoryProcess.where(participatory_process_group: @group).order(weight: :asc)
end