debian-mirror-gitlab/app/helpers/timeboxes_routing_helper.rb

22 lines
638 B
Ruby
Raw Normal View History

2018-12-05 23:21:45 +05:30
# frozen_string_literal: true
2020-06-23 00:09:42 +05:30
module TimeboxesRoutingHelper
2017-09-10 17:25:29 +05:30
def milestone_path(milestone, *args)
2018-03-17 18:26:18 +05:30
if milestone.group_milestone?
2017-09-10 17:25:29 +05:30
group_milestone_path(milestone.group, milestone, *args)
2018-03-17 18:26:18 +05:30
elsif milestone.project_milestone?
2017-09-10 17:25:29 +05:30
project_milestone_path(milestone.project, milestone, *args)
end
end
def milestone_url(milestone, *args)
2018-03-17 18:26:18 +05:30
if milestone.group_milestone?
2017-09-10 17:25:29 +05:30
group_milestone_url(milestone.group, milestone, *args)
2018-03-17 18:26:18 +05:30
elsif milestone.project_milestone?
2017-09-10 17:25:29 +05:30
project_milestone_url(milestone.project, milestone, *args)
end
end
end
2020-06-23 00:09:42 +05:30
2021-06-08 01:23:25 +05:30
TimeboxesRoutingHelper.prepend_mod_with('TimeboxesRoutingHelper')