Issue #649: Wrong days remaining label when submitting a new proposal

This commit is contained in:
raluka 2015-08-21 19:15:02 +02:00
parent 124d275a09
commit 1de8f979cd
4 changed files with 23 additions and 18 deletions

View file

@ -63,6 +63,11 @@ class CallForPaper < ActiveRecord::Base
&& !self.conference.email_settings.call_for_papers_dates_updates_template.blank?
end
def remaining_days(date = Date.today)
result = (self.end_date - date).to_i
result > 0 ? result : 0
end
private
def before_end_of_conference