Load the Booth polls instead of all current/incoming on Shift creation for date ranges

This commit is contained in:
Bertocq
2017-10-04 11:02:09 +02:00
parent e67ca1f86b
commit 15039b6c5d
3 changed files with 4 additions and 7 deletions

View File

@@ -1,7 +1,6 @@
class Admin::Poll::ShiftsController < Admin::Poll::BaseController
before_action :load_booth
before_action :load_polls
before_action :load_officer
def new
@@ -39,10 +38,6 @@ class Admin::Poll::ShiftsController < Admin::Poll::BaseController
@booth = ::Poll::Booth.find(params[:booth_id])
end
def load_polls
@polls = ::Poll.current_or_incoming
end
def load_shifts
@shifts = @booth.shifts
end