Class: Decidim::Consultations::ConsultationsController

Inherits:
ApplicationController show all
Includes:
NeedsConsultation, Orderable, FilterResource, Paginable
Defined in:
app/controllers/decidim/consultations/consultations_controller.rb

Overview

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

Instance Method Summary collapse

Methods included from NeedsConsultation

enhance_controller, extended, included

Instance Method Details

#indexObject



24
25
26
# File 'app/controllers/decidim/consultations/consultations_controller.rb', line 24

def index
  enforce_permission_to :read, :consultation_list
end

#showObject



28
29
30
# File 'app/controllers/decidim/consultations/consultations_controller.rb', line 28

def show
  enforce_permission_to :read, :consultation, consultation: current_consultation
end