Class: Decidim::ParticipatoryProcesses::ParticipatoryProcessesController

Inherits:
ApplicationController
  • Object
show all
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



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

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

  authorize! :read, ParticipatoryProcess
  authorize! :read, ParticipatoryProcessGroup
end

#showObject



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

def show
  authorize! :read, current_participatory_process
end