Class: Decidim::ParticipatoryProcesses::GroupPublishedParticipatoryProcesses

Inherits:
Query
  • Object
show all
Defined in:
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 '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 'app/queries/decidim/participatory_processes/group_published_participatory_processes.rb', line 12

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