Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-11-24 14:38:54 +0300
committerJames Lopez <james@jameslopez.es>2016-11-25 13:47:33 +0300
commit9c49fa2d92a3ab1051df87e4d75d9802a1b7cfc7 (patch)
tree7081443e9d0cb6af6cf5707ecdb13ade48c692f0 /app/serializers
parentafe90d529c82566886d1f2513dd6bee4fa73ff94 (diff)
fix for builds with no start date and spec
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/entity_date_helper.rb2
1 files changed, 2 insertions, 0 deletions
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