fixes conflicts with polls
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -2,7 +2,7 @@ class Officing::PollsController < Officing::BaseController
|
||||
|
||||
def index
|
||||
@polls = current_user.poll_officer? ? current_user.poll_officer.assigned_polls : []
|
||||
@polls = @polls.select {|poll| poll.current?(1.day.ago)}
|
||||
@polls = @polls.select {|poll| poll.current?(Time.current) || poll.current?(1.day.ago)}
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user