Skip to content

Commit 7976b30

Browse files
author
Theresa
committed
Fix yourself displaying
1 parent fe96ace commit 7976b30

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app/views/comments/comments_all.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<td><%= comment.text %></td>
2323
<% if !comment.user %>
2424
<td> <%= 'User undefined' %> </td>
25-
<% elsif @exercise.user == current_user %>
25+
<% elsif comment.user == current_user %>
2626
<td><%= 'yourself' %></td>
2727
<% elsif comment.user.first_name.nil?%>
2828
<td><%= link_to "User#{comment.user.id}", user_path(comment.user)%></td>

app/views/comments/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<td><%= comment.text %></td>
2828
<% if !comment.user %>
2929
<td> <%= 'User undefined' %> </td>
30-
<% elsif @exercise.user == current_user %>
30+
<% elsif comment.user == current_user %>
3131
<td><%= 'yourself' %></td>
3232
<% elsif comment.user.first_name.nil? || current_user.role === 'user'%>
3333
<td><%= "User#{comment.user.id}"%></td>

app/views/exercises/exercises_all.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<td><%= link_to exercise.title, exercise %></td>
1818
<% if !exercise.user %>
1919
<td> <%= 'User undefined' %> </td>
20-
<% elsif @exercise.user == current_user %>
20+
<% elsif exercise.user == current_user %>
2121
<td><%= 'yourself' %></td>
2222
<% elsif exercise.user.first_name.nil?%>
2323
<td><%= link_to "User#{exercise.user.id}", user_path(exercise.user)%></td>

0 commit comments

Comments
 (0)