diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-08-16 00:48:43 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-08-16 00:48:43 +0300 |
commit | 1501b1abc4be78eaa4cb4c28969d9bc59bcf284c (patch) | |
tree | dc82b4b9e0436651e1804c7e0e76d99234c85752 /app/helpers/ci_status_helper.rb | |
parent | d8dfa56e95c794a91c0a1185e5e6c0017e144b25 (diff) |
Fixed bug when a pipeline for latest SHA does not exist
Diffstat (limited to 'app/helpers/ci_status_helper.rb')
-rw-r--r-- | app/helpers/ci_status_helper.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb index ea2f5f9281a..0f7fcc0416c 100644 --- a/app/helpers/ci_status_helper.rb +++ b/app/helpers/ci_status_helper.rb @@ -25,6 +25,11 @@ module CiStatusHelper end end + def ci_status_for_statuseable(subject) + status = subject.try(:status) || 'not found' + status.humanize + end + def ci_icon_for_status(status) icon_name = case status |