allows poll booth recounts only for voting days

This commit is contained in:
Juanjo Bazán
2017-01-30 12:41:48 +01:00
parent b96cfbc837
commit 26ae87c1f1

View File

@@ -6,6 +6,7 @@ class Officing::RecountsController < Officing::BaseController
@officer_assignments = ::Poll::OfficerAssignment.
includes(:recount, booth_assignment: :booth).
joins(:booth_assignment).
voting_days.
where(id: current_user.poll_officer.officer_assignment_ids).
where("poll_booth_assignments.poll_id = ?", @poll.id).
order(date: :asc)