Skip to content

Commit

Permalink
Fix yourself displaying
Browse files Browse the repository at this point in the history
  • Loading branch information
Theresa committed Feb 15, 2016
1 parent fe96ace commit 7976b30
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/comments/comments_all.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<td><%= comment.text %></td>
<% if !comment.user %>
<td> <%= 'User undefined' %> </td>
<% elsif @exercise.user == current_user %>
<% elsif comment.user == current_user %>
<td><%= 'yourself' %></td>
<% elsif comment.user.first_name.nil?%>
<td><%= link_to "User#{comment.user.id}", user_path(comment.user)%></td>
Expand Down
2 changes: 1 addition & 1 deletion app/views/comments/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<td><%= comment.text %></td>
<% if !comment.user %>
<td> <%= 'User undefined' %> </td>
<% elsif @exercise.user == current_user %>
<% elsif comment.user == current_user %>
<td><%= 'yourself' %></td>
<% elsif comment.user.first_name.nil? || current_user.role === 'user'%>
<td><%= "User#{comment.user.id}"%></td>
Expand Down
2 changes: 1 addition & 1 deletion app/views/exercises/exercises_all.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<td><%= link_to exercise.title, exercise %></td>
<% if !exercise.user %>
<td> <%= 'User undefined' %> </td>
<% elsif @exercise.user == current_user %>
<% elsif exercise.user == current_user %>
<td><%= 'yourself' %></td>
<% elsif exercise.user.first_name.nil?%>
<td><%= link_to "User#{exercise.user.id}", user_path(exercise.user)%></td>
Expand Down

0 comments on commit 7976b30

Please sign in to comment.