Class: Decidim::ParticipatoryProcesses::VisibleParticipatoryProcesses

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

Overview

This query class filters participatory processes given a current_user.

Instance Method Summary collapse

Constructor Details

#initialize(current_user) ⇒ VisibleParticipatoryProcesses

Returns a new instance of VisibleParticipatoryProcesses.



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

def initialize(current_user)
  @current_user = current_user
end

Instance Method Details

#queryObject



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

def query
  Decidim::ParticipatoryProcess.visible_for(@current_user)
end