diff options
Diffstat (limited to 'app/helpers/gitlab_routing_helper.rb')
-rw-r--r-- | app/helpers/gitlab_routing_helper.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/gitlab_routing_helper.rb b/app/helpers/gitlab_routing_helper.rb index 38ca12e6f90..3810041b2af 100644 --- a/app/helpers/gitlab_routing_helper.rb +++ b/app/helpers/gitlab_routing_helper.rb @@ -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) |