Class: Decidim::Elections::ElectionsController

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



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

def election_log; end

#indexObject



14
15
16
# File '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 'app/controllers/decidim/elections/elections_controller.rb', line 18

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