Class: Decidim::ParticipatoryProcesses::ParticipatoryProcessesController

Inherits:
ApplicationController
  • Object
show all
Includes:
ParticipatorySpaceContext
Defined in:
app/controllers/decidim/participatory_processes/participatory_processes_controller.rb

Overview

A controller that holds the logic to show ParticipatoryProcesses in a public layout.

Instance Method Summary collapse

Instance Method Details

#indexObject



22
23
24
25
26
27
# File 'app/controllers/decidim/participatory_processes/participatory_processes_controller.rb', line 22

def index
  redirect_to "/404" if published_processes.none?

  enforce_permission_to :list, :process
  enforce_permission_to :list, :process_group
end

#showObject



29
30
31
# File 'app/controllers/decidim/participatory_processes/participatory_processes_controller.rb', line 29

def show
  check_current_user_can_visit_space
end