Do not require author for note to display (#2350)

This commit is contained in:
Jess Lee 2019-04-09 15:13:27 -04:00 committed by Mac Siri
parent 6c6a4516df
commit de76f3722f

View file

@ -2,7 +2,7 @@
<h3><u>Notes</u></h3>
<% if @user.notes.count > 0 %>
<% @user.notes.each do |note| %>
<p><em><%= note.created_at.strftime("%d %B %Y %H:%M UTC") %> by <%= User.find(note.author_id).username %></em> -
<p><em><%= note.created_at.strftime("%d %B %Y %H:%M UTC") %> by <%= User.find(note.author_id).username if note.author_id.present? %></em> -
<% if !note.reason.blank? %><strong><%= note.reason %>:</strong>
<% end %><%= note.content %></p>
<% end %>