Files
grecia/app/controllers/admin/poll/recounts_controller.rb
Angel Perez 0b708397df Add base controller for Admin:Poll controller
Fixes #1848

On branch aperez-fix-for-issue-1848
  Changes to be committed:
    new file:   app/controllers/admin/poll/base_controller.rb
    modified:   app/controllers/admin/poll/booth_assignments_controller.rb
    modified:   app/controllers/admin/poll/booths_controller.rb
    modified:   app/controllers/admin/poll/officer_assignments_controller.rb
    modified:   app/controllers/admin/poll/officers_controller.rb
    modified:   app/controllers/admin/poll/polls_controller.rb
    modified:   app/controllers/admin/poll/questions_controller.rb
    modified:   app/controllers/admin/poll/recounts_controller.rb
    modified:   app/controllers/admin/poll/results_controller.rb
    modified:   app/controllers/admin/poll/shifts_controller.rb
2017-09-13 12:22:57 -04:00

17 lines
439 B
Ruby

class Admin::Poll::RecountsController < Admin::Poll::BaseController
before_action :load_poll
def index
@booth_assignments = @poll.booth_assignments.
includes(:booth, :final_recounts, :voters).
order("poll_booths.name").
page(params[:page]).per(50)
end
private
def load_poll
@poll = ::Poll.find(params[:poll_id])
end
end