]> git.openstreetmap.org Git - rails.git/commitdiff
Avoid empty content_for blocks as they trigger warnings
authorTom Hughes <tom@compton.nu>
Wed, 22 Sep 2010 17:40:17 +0000 (18:40 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 14 Nov 2011 09:42:45 +0000 (09:42 +0000)
app/views/site/index.html.erb

index 8d0864f01329055db8fae49782d1831922318169..71cafacbc2d7794dea2869706419513e16a05d1f 100644 (file)
@@ -1,7 +1,7 @@
-<% content_for :greeting do %>
 <% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
-  <%= link_to_function t('layouts.home'), "setPosition(#{@user.home_lat}, #{@user.home_lon}, 15)", { :title => t('layouts.home_tooltip') } %> |
-<% end %>
+  <% content_for :greeting do %>
+    <%= link_to_function t('layouts.home'), "setPosition(#{@user.home_lat}, #{@user.home_lon}, 15)", { :title => t('layouts.home_tooltip') } %> |
+  <% end %>
 <% end %>
 
 <%= render :partial => 'sidebar', :locals => { :onopen => "resizeMap();", :onclose => "resizeMap();" } %>