gitlab-org--gitlab-foss/app/helpers/milestones_routing_helper.rb
2018-09-06 17:33:46 -07:00

19 lines
572 B
Ruby

# frozen_string_literal: true
module MilestonesRoutingHelper
def milestone_path(milestone, *args)
if milestone.group_milestone?
group_milestone_path(milestone.group, milestone, *args)
elsif milestone.project_milestone?
project_milestone_path(milestone.project, milestone, *args)
end
end
def milestone_url(milestone, *args)
if milestone.group_milestone?
group_milestone_url(milestone.group, milestone, *args)
elsif milestone.project_milestone?
project_milestone_url(milestone.project, milestone, *args)
end
end
end