Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7fee6289
Commit
7fee6289
authored
Dec 05, 2019
by
Francisco Javier López
Committed by
Dmitriy Zaporozhets
Dec 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix route snippet helpers
parent
b9ae6b69
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
app/helpers/gitlab_routing_helper.rb
app/helpers/gitlab_routing_helper.rb
+4
-4
changelogs/unreleased/fj-38068-fix-snippet-route-refactor.yml
...gelogs/unreleased/fj-38068-fix-snippet-route-refactor.yml
+5
-0
No files found.
app/helpers/gitlab_routing_helper.rb
View file @
7fee6289
...
...
@@ -195,7 +195,7 @@ module GitlabRoutingHelper
end
def
snippet_path
(
snippet
,
*
args
)
if
snippet
.
is_a?
(
ProjectSnippet
)
if
snippet
.
type
==
"ProjectSnippet"
application_url_helpers
.
project_snippet_path
(
snippet
.
project
,
snippet
,
*
args
)
else
new_args
=
snippet_query_params
(
snippet
,
*
args
)
...
...
@@ -204,7 +204,7 @@ module GitlabRoutingHelper
end
def
snippet_url
(
snippet
,
*
args
)
if
snippet
.
is_a?
(
ProjectSnippet
)
if
snippet
.
type
==
"ProjectSnippet"
application_url_helpers
.
project_snippet_url
(
snippet
.
project
,
snippet
,
*
args
)
else
new_args
=
snippet_query_params
(
snippet
,
*
args
)
...
...
@@ -213,7 +213,7 @@ module GitlabRoutingHelper
end
def
raw_snippet_path
(
snippet
,
*
args
)
if
snippet
.
is_a?
(
ProjectSnippet
)
if
snippet
.
type
==
"ProjectSnippet"
application_url_helpers
.
raw_project_snippet_path
(
snippet
.
project
,
snippet
,
*
args
)
else
new_args
=
snippet_query_params
(
snippet
,
*
args
)
...
...
@@ -222,7 +222,7 @@ module GitlabRoutingHelper
end
def
raw_snippet_url
(
snippet
,
*
args
)
if
snippet
.
is_a?
(
ProjectSnippet
)
if
snippet
.
type
==
"ProjectSnippet"
application_url_helpers
.
raw_project_snippet_url
(
snippet
.
project
,
snippet
,
*
args
)
else
new_args
=
snippet_query_params
(
snippet
,
*
args
)
...
...
changelogs/unreleased/fj-38068-fix-snippet-route-refactor.yml
0 → 100644
View file @
7fee6289
---
title
:
Fix snippet routes
merge_request
:
21248
author
:
type
:
fixed
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment