Show future events in admin booths view
Closed this issue · 1 comments
rohitverma007 commented
In app/models/poll.rb, add a method to the Poll model call future_event?, that takes in timestamp as a parameter, with default value being Time.current. The method checks if the Poll is a future event by checking whether the starts_at property of the Poll starts in the future by comparing it with the timestamp.
Also, add a new method in app/models/poll/booth.rb, called self.available_for_admin that is a slightly modified version of “available” method, it should return current_or_recounting and future_event? polls
https://github.com/rohitverma007/consuldemocracy/blob/master/app/models/poll.rb
https://github.com/consuldemocracy/consuldemocracy/blob/master/app/models/poll/booth.rb
rohitverma007 commented
closed by #2