diff --git a/app/helpers/comments_helper.rb b/app/helpers/comments_helper.rb index 6bfdd3f70..329f70ee4 100644 --- a/app/helpers/comments_helper.rb +++ b/app/helpers/comments_helper.rb @@ -12,7 +12,7 @@ module CommentsHelper def project_commentable_path(project, commentable) case when Comment.issue_comment?(commentable.class) - polymorphic_path [project, commentable] + polymorphic_path [project, commentable.pull_request ? commentable.pull_request : commentable] when Comment.commit_comment?(commentable.class) commit_path project, commentable.id end