voting period is open when voting dates are not set

This commit is contained in:
differentreality 2016-08-17 15:55:10 +03:00 committed by Stella Rouzi
parent d07de3ca88
commit ea868d4cc7
3 changed files with 6 additions and 6 deletions

View file

@ -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!'