voting period is open when voting dates are not set
This commit is contained in:
parent
d07de3ca88
commit
ea868d4cc7
3 changed files with 6 additions and 6 deletions
|
|
@ -4,7 +4,7 @@ module ApplicationHelper
|
|||
#
|
||||
def voting_open_or_close(program)
|
||||
return if program.voting_period?
|
||||
if program.voting_start_date > Date.today
|
||||
if program.voting_start_date > Time.current
|
||||
return 'Voting period has not started yet!'
|
||||
else # voting_end_date > Date.today because voting_start_date < voting_end_date
|
||||
return 'Voting period is over!'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue