Commit b5ece088 authored by Phil Hughes's avatar Phil Hughes

Ruby fixes

parent 35b3c709
...@@ -48,18 +48,11 @@ module IssuablesHelper ...@@ -48,18 +48,11 @@ module IssuablesHelper
end end
def milestone_dropdown_label(milestone_title, default_label) def milestone_dropdown_label(milestone_title, default_label)
milestone_title = if milestone_title == Milestone::Upcoming.name
if milestone_title == Milestone::Upcoming.name milestone_title = Milestone::Upcoming.title
Milestone::Upcoming.title
else
milestone_title
end
if !milestone_title.nil? && !milestone_title.empty?
h(milestone_title)
else
default_label
end end
h(milestone_title.presence || default_label)
end end
private private
......
...@@ -8,7 +8,7 @@ class GlobalMilestone ...@@ -8,7 +8,7 @@ class GlobalMilestone
milestones = milestones.group_by(&:title) milestones = milestones.group_by(&:title)
milestones.map do |title, milestones| milestones.map do |title, milestones|
new(title, milestones) new(title, milestones)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment