adds system recounting to admin booth_assignments

This commit is contained in:
Juanjo Bazán
2017-01-27 15:19:03 +01:00
parent 3d28b317e2
commit e634e80113
4 changed files with 86 additions and 9 deletions

View File

@@ -24,7 +24,8 @@ class Admin::Poll::BoothAssignmentsController < Admin::BaseController
def show
@poll = ::Poll.find(params[:poll_id])
@booth_assignment = @poll.booth_assignments.includes(:recounts, officer_assignments: [officer: [:user]]).find(params[:id])
@booth_assignment = @poll.booth_assignments.includes(:recounts, :voters, officer_assignments: [officer: [:user]]).find(params[:id])
@voters_by_date = @booth_assignment.voters.group_by {|v| v.created_at.to_date}
end
private