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

18 lines
541 B
Ruby
Raw Normal View History

2017-09-10 17:25:29 +05:30
module MilestonesRoutingHelper
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