summaryrefslogtreecommitdiff
path: root/app/helpers/gitlab_routing_helper.rb
diff options
context:
space:
mode:
authorJarka Kadlecova <jarka@gitlab.com>2017-05-03 10:48:01 +0200
committerJarka Kadlecova <jarka@gitlab.com>2017-05-05 15:45:49 +0200
commite4f7b87ddb4ba83456871eb83b841192b1b56799 (patch)
treecf79d159784d2c5573acf8a56a8ea09bccaf2d81 /app/helpers/gitlab_routing_helper.rb
parent729c006ff82fcb87afe8eb3e6a21254892f43afd (diff)
downloadgitlab-ce-e4f7b87ddb4ba83456871eb83b841192b1b56799.tar.gz
Support comments for personal snippets
Diffstat (limited to 'app/helpers/gitlab_routing_helper.rb')
-rw-r--r--app/helpers/gitlab_routing_helper.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/helpers/gitlab_routing_helper.rb b/app/helpers/gitlab_routing_helper.rb
index 88f9a691a17..3769830de2a 100644
--- a/app/helpers/gitlab_routing_helper.rb
+++ b/app/helpers/gitlab_routing_helper.rb
@@ -123,7 +123,11 @@ module GitlabRoutingHelper
end
def preview_markdown_path(project, *args)
- preview_markdown_namespace_project_path(project.namespace, project, *args)
+ if @snippet.is_a?(PersonalSnippet)
+ preview_markdown_snippet_path(@snippet)
+ else
+ preview_markdown_namespace_project_path(project.namespace, project, *args)
+ end
end
def toggle_subscription_path(entity, *args)