summaryrefslogtreecommitdiff
path: root/app/helpers/merge_requests_helper.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-06-29 12:06:35 -0500
committerDouwe Maan <douwe@selenight.nl>2017-07-05 11:11:59 -0500
commitfe13f110412d85c05dc68e5ee1db499f681bf722 (patch)
tree4a2d172bb5a490ac8cadbcf376fbf815393ef22b /app/helpers/merge_requests_helper.rb
parentdc7939337e0d72d2391c3bbb3082d644a54195af (diff)
downloadgitlab-ce-fe13f110412d85c05dc68e5ee1db499f681bf722.tar.gz
Create and use project path helpers that only need a project, no namespace
Diffstat (limited to 'app/helpers/merge_requests_helper.rb')
-rw-r--r--app/helpers/merge_requests_helper.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb
index 54d6f86fa11..78cf7b26a31 100644
--- a/app/helpers/merge_requests_helper.rb
+++ b/app/helpers/merge_requests_helper.rb
@@ -1,8 +1,7 @@
module MergeRequestsHelper
def new_mr_path_from_push_event(event)
target_project = event.project.default_merge_request_target
- namespace_project_new_merge_request_path(
- event.project.namespace,
+ project_new_merge_request_path(
event.project,
new_mr_from_push_event(event, target_project)
)
@@ -48,8 +47,8 @@ module MergeRequestsHelper
end
def mr_change_branches_path(merge_request)
- namespace_project_new_merge_request_path(
- @project.namespace, @project,
+ project_new_merge_request_path(
+ @project,
merge_request: {
source_project_id: merge_request.source_project_id,
target_project_id: merge_request.target_project_id,
@@ -82,9 +81,7 @@ module MergeRequestsHelper
end
def merge_request_version_path(project, merge_request, merge_request_diff, start_sha = nil)
- diffs_namespace_project_merge_request_path(
- project.namespace, project, merge_request,
- diff_id: merge_request_diff.id, start_sha: start_sha)
+ diffs_project_merge_request_path(project, merge_request, diff_id: merge_request_diff.id, start_sha: start_sha)
end
def version_index(merge_request_diff)