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:
authorConnor Shea <connor.james.shea@gmail.com>2016-07-15 23:08:27 +0300
committerConnor Shea <connor.james.shea@gmail.com>2016-07-19 21:31:24 +0300
commit737e5226f87b06c2fe8633819bce1fde16308f19 (patch)
treed5755143f325959fdff83ad7d5da990882180ff5 /app/helpers/ci_status_helper.rb
parentb2a79554c339a583b6cc0d471b8224a24f11c96d (diff)
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.rb5
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