Files
grecia/app/controllers/admin/poll/recounts_controller.rb
Javi Martín 123196e4ed Display the same results for stats and recounts
In the recounts we were incorrectly assuming the total amount included
the blank and invalid ballots.
2019-05-30 17:22:39 +02:00

19 lines
470 B
Ruby

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