Don't break when the user isn't logged in...
This commit is contained in:
parent
d2bd78627e
commit
3db77411b8
2 changed files with 2 additions and 2 deletions
|
@ -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 %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% 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 %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue