From 26ae87c1f102e0be859bf52a93778c3cd89d2fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baza=CC=81n?= Date: Mon, 30 Jan 2017 12:41:48 +0100 Subject: [PATCH] allows poll booth recounts only for voting days --- app/controllers/officing/recounts_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/officing/recounts_controller.rb b/app/controllers/officing/recounts_controller.rb index 0e0a79d69..53998e7c6 100644 --- a/app/controllers/officing/recounts_controller.rb +++ b/app/controllers/officing/recounts_controller.rb @@ -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)