From d4f1c5aee14c8150f69a490d9714222d8f9a56f6 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Thu, 7 Feb 2019 21:13:21 +0100 Subject: [PATCH] Use correct policy to check if RfC could be accessed --- app/views/request_for_comments/index.html.slim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/request_for_comments/index.html.slim b/app/views/request_for_comments/index.html.slim index eb266d64..a91b0de8 100644 --- a/app/views/request_for_comments/index.html.slim +++ b/app/views/request_for_comments/index.html.slim @@ -32,7 +32,7 @@ h1 = RequestForComment.model_name.human(count: 2) span class="fa fa-check" style="color:darkgrey" aria-hidden="true" - else td = '' - td = link_to_if(policy(request_for_comment.exercise).show?, request_for_comment.exercise.title, request_for_comment) + td = link_to_if(policy(request_for_comment).show?, request_for_comment.exercise.title, request_for_comment) - if request_for_comment.has_attribute?(:question) && request_for_comment.question.present? td = truncate(request_for_comment.question, length: 200) - else