adds officing's polls index

This commit is contained in:
Juanjo Bazán
2017-01-03 22:22:52 +01:00
parent 2886d6d954
commit 09dac72471
7 changed files with 58 additions and 7 deletions

View File

@@ -0,0 +1,8 @@
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)}
end
end