Use correct policy to check if RfC could be accessed

This commit is contained in:
Sebastian Serth
2019-02-07 21:13:21 +01:00
parent 1b72d9d01a
commit d4f1c5aee1

View File

@ -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