summaryrefslogtreecommitdiff
path: root/app/helpers/issuables_helper.rb
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-03-29 12:19:09 +0100
committerPhil Hughes <me@iamphill.com>2016-03-29 12:19:09 +0100
commitb5ece0886a421247ed572e19ac3ccbcb685883b8 (patch)
tree2c9d207e605dc9a908bcddbcc52b497ea953f9a7 /app/helpers/issuables_helper.rb
parent35b3c7096dc8d49000b896fd8ff1eb999e8cc321 (diff)
downloadgitlab-ce-b5ece0886a421247ed572e19ac3ccbcb685883b8.tar.gz
Ruby fixes
Diffstat (limited to 'app/helpers/issuables_helper.rb')
-rw-r--r--app/helpers/issuables_helper.rb15
1 files changed, 4 insertions, 11 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb
index 462bfdb81c0..3709d04e8a2 100644
--- a/app/helpers/issuables_helper.rb
+++ b/app/helpers/issuables_helper.rb
@@ -48,18 +48,11 @@ module IssuablesHelper
end
def milestone_dropdown_label(milestone_title, default_label)
- milestone_title =
- if milestone_title == Milestone::Upcoming.name
- Milestone::Upcoming.title
- else
- milestone_title
- end
-
- if !milestone_title.nil? && !milestone_title.empty?
- h(milestone_title)
- else
- default_label
+ if milestone_title == Milestone::Upcoming.name
+ milestone_title = Milestone::Upcoming.title
end
+
+ h(milestone_title.presence || default_label)
end
private