Don't break when the user isn't logged in...

This commit is contained in:
Tom Hughes 2007-08-24 19:06:25 +00:00
parent d2bd78627e
commit 3db77411b8
2 changed files with 2 additions and 2 deletions

View file

@ -4,7 +4,7 @@
</p>
<% else %>
<% content_for :greeting do %>
<% if !@user.home_lon.nil? and !@user.home_lat.nil? %>
<% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
<%= link_to_function 'home', "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)" %> |
<% end %>
<% end %>