Class: Decidim::Consultations::ConsultationsController

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

Overview

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

Constant Summary

Constants included from Paginable

Paginable::OPTIONS

Instance Method Summary collapse

Methods included from NeedsConsultation

enhance_controller, extended, included

Methods included from RegistersPermissions

register_permissions

Methods included from UserBlockedChecker

#check_user_block_status, #check_user_not_blocked

Methods included from NeedsSnippets

#snippets

Methods included from HttpCachingDisabler

#disable_http_caching

Methods included from HasStoredPath

#skip_store_location?, #store_current_location

Methods included from NeedsOrganization

enhance_controller, extended, included

Instance Method Details

#indexObject


26
27
28
# File 'decidim-consultations/app/controllers/decidim/consultations/consultations_controller.rb', line 26

def index
  enforce_permission_to :read, :consultation_list
end

#showObject


30
31
32
# File 'decidim-consultations/app/controllers/decidim/consultations/consultations_controller.rb', line 30

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