Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix error for users with no status or location

  • Loading branch information...
commit 94314a0977f7d30c0df5e82292dfeb2a9f4fceb3 1 parent f28b451
@sferik sferik authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 app/views/sessions/new.html.erb
View
4 app/views/sessions/new.html.erb
@@ -4,6 +4,7 @@
Welcome <%= link_to(@user.name, @user.url) %>
</h3>
<table>
+ <% unless @user.location.blank? %>
<tr>
<th>
Location
@@ -12,6 +13,7 @@
<%= @user.location %>
</td>
</tr>
+ <% end %>
<tr>
<th>
Friends
@@ -29,12 +31,14 @@
</td>
</tr>
</table>
+ <% unless @user.status.blank? %>
<p>
<%= "#{time_ago_in_words(@user.status.created_at).capitalize} ago, you said:" %>
<q>
<%= @user.status.text %>
</q>
</p>
+ <% end %>
<%= form_tag('/sessions/destroy', :method => :delete) do %>
<%= submit_tag 'Sign out' %>
<% end %>
Please sign in to comment.
Something went wrong with that request. Please try again.