fix error when last_seen = nil

This commit is contained in:
jomo
2014-07-20 17:27:41 +02:00
parent ffb3217be2
commit d9ea42fa35

View File

@@ -80,7 +80,13 @@
</tr> </tr>
<tr> <tr>
<td><b>Last seen</b></td> <td><b>Last seen</b></td>
<td><time title="<%= @user.last_seen.strftime("%e %b %Y, %H:%M") %>" datetime="<%= @user.last_seen.to_datetime.rfc3339 %>"><%= @user.last_seen.strftime("%e %b %Y, %H:%M") %></time></td> <td>
<% if @user.last_seen %>
<time title="<%= @user.last_seen.strftime("%e %b %Y, %H:%M") %>" datetime="<%= @user.last_seen.to_datetime.rfc3339 %>"><%= @user.last_seen.strftime("%e %b %Y, %H:%M") %></time>
<% else %>
Never
<% end %>
</td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>