Add calculate_winners on Admin Budget controller, route and ability for admins

This commit is contained in:
Bertocq
2017-06-21 19:39:28 +02:00
parent ee9d3cd7e3
commit 154cdac332
5 changed files with 21 additions and 9 deletions

View File

@@ -67,8 +67,12 @@ class Budget < ActiveRecord::Base
phase == "finished"
end
def balloting_process?
balloting? || reviewing_ballots?
end
def balloting_or_later?
balloting? || reviewing_ballots? || finished?
balloting_process? || finished?
end
def on_hold?