Commit 0a4dec24 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add explanation to routing method

parent 1da71cc5
# Shorter routing method for project and project items # Shorter routing method for project and project items
# Since update to rails 4.1.9 we are now allowed to use `/` in project routing
# so we use nested routing for project resources which include project and
# project namespace. To avoid writing long methods every time we define shortcuts for
# some of routing.
#
# For example instead of this:
#
# namespace_project_merge_request_path(merge_request.project.namespace, merge_request.projects, merge_request)
#
# We can simply use shortcut:
#
# merge_request_path(merge_request)
#
module GitlabRoutingHelper module GitlabRoutingHelper
def project_path(project, *args) def project_path(project, *args)
namespace_project_path(project.namespace, project, *args) namespace_project_path(project.namespace, project, *args)
......
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