Class: Decidim::ParticipatoryProcesses::GroupPublishedParticipatoryProcesses

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

Overview

This query class filters published processes of a participatory process group

Instance Method Summary collapse

Constructor Details

#initialize(group, user = nil) ⇒ GroupPublishedParticipatoryProcesses

Returns a new instance of GroupPublishedParticipatoryProcesses.


7
8
9
10
# File 'decidim-participatory_processes/app/queries/decidim/participatory_processes/group_published_participatory_processes.rb', line 7

def initialize(group, user = nil)
  @group = group
  @user = user
end

Instance Method Details

#queryObject


12
13
14
15
16
17
18
# File 'decidim-participatory_processes/app/queries/decidim/participatory_processes/group_published_participatory_processes.rb', line 12

def query
  Rectify::Query.merge(
    GroupParticipatoryProcesses.new(@group),
    VisibleParticipatoryProcesses.new(@user),
    PublishedParticipatoryProcesses.new
  ).query
end