We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe49618 commit 5e1a53fCopy full SHA for 5e1a53f
app/views/comments/comments_all.html.erb
@@ -14,7 +14,11 @@
14
<tbody>
15
<% @comments.each do |comment| %>
16
<tr>
17
- <td><%= link_to comment.exercise.title, exercise_path(comment.exercise) %></td>
+ <% if !comment.exercise %>
18
+ <td> <%= 'Exercise undefined' %> </td>
19
+ <% else %>
20
+ <td><%= link_to comment.exercise.title, exercise_path(comment.exercise) %></td>
21
+ <% end %>
22
<td><%= comment.text %></td>
23
<% if !comment.user %>
24
<td> <%= 'User undefined' %> </td>
0 commit comments