Skip to content

Commit 9883c08

Browse files
committed
fixed exercise show view
1 parent c922fd5 commit 9883c08

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/views/exercises/show.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
<dt><%= 'Visibility' %>:</dt>
1313
<dd><%= @exercise.public ? 'public' : 'private' %></dd>
1414
<dt><%= 'Created by' %>:</dt>
15-
<% if defined? @exercise.user %>
15+
<% if @exercise.user %>
1616
<% if @exercise.user.first_name.nil?%>
1717
<dd><%= "User#{@exercise.user.id}"%></dd>
1818
<% else %>
19-
<dd><%= @exercise.user.name %></dd>
19+
<dd><%= @exercise.user.name %></dd>
2020
<% end %>
2121
<% else %>
22-
<%= 'User undefined' %>
22+
<dd><%= 'User undefined' %></dd>
2323
<% end %>
2424
<dt><%= 'Created at' %>:</dt>
2525
<dd><%= @exercise.created_at %></dd>

0 commit comments

Comments
 (0)