Class: Admin::PollsController

Inherits:
ApplicationController
  • Object
show all
Includes:
Effective::CrudController
Defined in:
app/controllers/admin/polls_controller.rb

Instance Method Summary collapse

Instance Method Details

#permitted_paramsObject



18
19
20
# File 'app/controllers/admin/polls_controller.rb', line 18

def permitted_params
  params.require(:effective_poll).permit!
end

#resultsObject



10
11
12
13
14
15
16
# File 'app/controllers/admin/polls_controller.rb', line 10

def results
  @poll = Effective::Poll.find(params[:id])
  EffectivePolls.authorize!(self, :results, @poll)

  @datatable = Admin::EffectivePollResultsDatatable.new(poll_token: @poll.token)
  @page_title = "#{@poll} Results"
end