diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-06-29 12:06:35 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-07-05 11:11:59 -0500 |
commit | fe13f110412d85c05dc68e5ee1db499f681bf722 (patch) | |
tree | 4a2d172bb5a490ac8cadbcf376fbf815393ef22b /app/helpers/notes_helper.rb | |
parent | dc7939337e0d72d2391c3bbb3082d644a54195af (diff) | |
download | gitlab-ce-fe13f110412d85c05dc68e5ee1db499f681bf722.tar.gz |
Create and use project path helpers that only need a project, no namespace
Diffstat (limited to 'app/helpers/notes_helper.rb')
-rw-r--r-- | app/helpers/notes_helper.rb | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index ecc6cd6c6c5..0a0881d95cf 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -81,11 +81,11 @@ module NotesHelper path_params = version_params.merge(anchor: discussion.line_code) - diffs_namespace_project_merge_request_path(discussion.project.namespace, discussion.project, discussion.noteable, path_params) + diffs_project_merge_request_path(discussion.project, discussion.noteable, path_params) elsif discussion.for_commit? anchor = discussion.line_code if discussion.diff_discussion? - namespace_project_commit_path(discussion.project.namespace, discussion.project, discussion.noteable, anchor: anchor) + project_commit_path(discussion.project, discussion.noteable, anchor: anchor) end end @@ -93,12 +93,7 @@ module NotesHelper if @snippet.is_a?(PersonalSnippet) snippet_notes_path(@snippet) else - namespace_project_noteable_notes_path( - namespace_id: @project.namespace, - project_id: @project, - target_id: @noteable.id, - target_type: @noteable.class.name.underscore - ) + project_noteable_notes_path(@project, target_id: @noteable.id, target_type: @noteable.class.name.underscore) end end @@ -106,7 +101,7 @@ module NotesHelper if note.noteable.is_a?(PersonalSnippet) snippet_note_path(note.noteable, note) else - namespace_project_note_path(project.namespace, project, note) + project_note_path(project, note) end end |