Class: Decidim::Elections::ElectionsController

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

Overview

Exposes the elections resources so users can participate on them

Instance Method Summary collapse

Methods included from HasVoteFlow

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

Instance Method Details

#election_logObject



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

def election_log; end

#indexObject



17
18
19
# File '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 'app/controllers/decidim/elections/elections_controller.rb', line 21

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