Skip to content

Commit

Permalink
Fix error for users with no status or location
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed May 5, 2011
1 parent f28b451 commit 94314a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/views/sessions/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Welcome <%= link_to(@user.name, @user.url) %>
</h3>
<table>
<% unless @user.location.blank? %>
<tr>
<th>
Location
Expand All @@ -12,6 +13,7 @@
<%= @user.location %>
</td>
</tr>
<% end %>
<tr>
<th>
Friends
Expand All @@ -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 %>
Expand Down

0 comments on commit 94314a0

Please sign in to comment.