Class: Decidim::Elections::ElectionsController

Inherits:
ApplicationController show all
Includes:
HasVoteFlow, Orderable, FilterResource, Paginable
Defined in:
decidim-elections/app/controllers/decidim/elections/elections_controller.rb

Overview

Exposes the elections resources so users can participate on them

Constant Summary

Constants included from Paginable

Paginable::OPTIONS

Instance Method Summary collapse

Methods included from HasVoteFlow

#ballot_questions, #can_preview?, #default_vote_flow, #preview_mode?, #vote_flow

Methods inherited from Components::BaseController

#current_component, #current_manifest, #current_participatory_space, #permission_class_chain, #permission_scope, #redirect_unless_feature_private, #share_token

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

#election_logObject


22
# File 'decidim-elections/app/controllers/decidim/elections/elections_controller.rb', line 22

def election_log; end

#indexObject


14
15
16
# File 'decidim-elections/app/controllers/decidim/elections/elections_controller.rb', line 14

def index
  redirect_to election_path(single, single: true) if single?
end

#showObject


18
19
20
# File 'decidim-elections/app/controllers/decidim/elections/elections_controller.rb', line 18

def show
  enforce_permission_to :view, :election, election: election
end