adds officing's polls index
This commit is contained in:
8
app/controllers/officing/polls_controller.rb
Normal file
8
app/controllers/officing/polls_controller.rb
Normal 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
|
||||
Reference in New Issue
Block a user