Created
January 13, 2011 16:52
-
-
Save diebels727/778165 to your computer and use it in GitHub Desktop.
audit view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% for audit in @audits %> | |
<tr> | |
<%if audit.user.present? #<--- Guard against nil users.%> | |
<td><%= link_to(audit.user.to_label, url_for(audit.user)) %></td> | |
<%else #<--- Present "Missing" on nil user.%> | |
<td>Missing</td> | |
<%end%> | |
<td><%= audit.kind %></td> | |
<% if audit.auditable.present? %> | |
<td><%= link_to(audit.auditable.to_label, url_for(audit.auditable) ) %></td> | |
<% else %> | |
<td>Missing</td> | |
<% end %> | |
<td><%= audit.created_at %></td> | |
</tr> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment