From 9c49fa2d92a3ab1051df87e4d75d9802a1b7cfc7 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Thu, 24 Nov 2016 12:38:54 +0100 Subject: fix for builds with no start date and spec --- app/serializers/entity_date_helper.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/serializers') diff --git a/app/serializers/entity_date_helper.rb b/app/serializers/entity_date_helper.rb index 918abba8d99..3cc98fb18a1 100644 --- a/app/serializers/entity_date_helper.rb +++ b/app/serializers/entity_date_helper.rb @@ -2,6 +2,8 @@ module EntityDateHelper include ActionView::Helpers::DateHelper def interval_in_words(diff) + return 'not started' unless diff + "#{distance_of_time_in_words(Time.now, diff)} ago" end -- cgit v1.2.1