Permalink
Browse files

Check for nil user

  • Loading branch information...
gbprz committed Dec 10, 2015
1 parent e3447d4 commit 2f245a6f4217b74d49639f88ac37f422f14d3612
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/views/documents/list/_document_list_item.html.erb
@@ -5,10 +5,10 @@
<div> <%= image_tag "icons/#{small_document_icon(doc.current_revision.extension_type)}" %> </div>
<div class="document-title"> <%= doc.title %> </div>
<div class="upload-details"> <%= "Uploaded on #{doc.current_revision.updated_at.to_date}" %> <br />
- <% if !doc.user.name.nil? %>
+ <% if !doc.user.nil? and !doc.user.name.nil? %>
<%= "by #{doc.user.name}" %>
<% end %> </div>
</div>
</a>
<% end %>
-<% end %>
+<% end %>

0 comments on commit 2f245a6

Please sign in to comment.