Class: Decidim::Elections::ElectionsController

Inherits:
ApplicationController show all
Includes:
HasVoteFlow, Orderable, FilterResource, IconHelper, 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 IconHelper

IconHelper::DEFAULT_RESOURCE_TYPE_ICONS

Constants included from Paginable

Paginable::OPTIONS

Instance Method Summary collapse

Methods included from IconHelper

#component_icon, #manifest_icon, #resource_icon, #resource_type_icon, #resource_type_icon_key, #text_with_resource_icon

Methods included from LayoutHelper

#_icon_classes, #apple_favicon, #application_path, #current_user_unread_data, #extended_navigation_bar, #external_icon, #favicon, #icon, #legacy_favicon, #organization_colors, #role

Methods included from TooltipHelper

#with_tooltip

Methods included from ModalHelper

#decidim_modal

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, #set_component_breadcrumb_item, #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 Headers::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



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

def election_log; end

#indexObject



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

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

#showObject



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

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