diff options
author | Connor Shea <connor.james.shea@gmail.com> | 2016-07-15 14:08:27 -0600 |
---|---|---|
committer | Connor Shea <connor.james.shea@gmail.com> | 2016-07-19 12:31:24 -0600 |
commit | 737e5226f87b06c2fe8633819bce1fde16308f19 (patch) | |
tree | d5755143f325959fdff83ad7d5da990882180ff5 /app/helpers/ci_status_helper.rb | |
parent | b2a79554c339a583b6cc0d471b8224a24f11c96d (diff) | |
download | gitlab-ce-737e5226f87b06c2fe8633819bce1fde16308f19.tar.gz |
Use switch statements instead of if/else chains.
Diffstat (limited to 'app/helpers/ci_status_helper.rb')
-rw-r--r-- | app/helpers/ci_status_helper.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb index c9217b846e7..44b8b7f6ca1 100644 --- a/app/helpers/ci_status_helper.rb +++ b/app/helpers/ci_status_helper.rb @@ -15,9 +15,10 @@ module CiStatusHelper end def ci_label_for_status(status) - if status == 'success' + case status + when 'success' 'passed' - elsif status == 'success_with_warnings' + when 'success_with_warnings' 'passed with warnings' else status |