]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/site_controller.rb
Merge remote-tracking branch 'upstream/pull/1659'
[rails.git] / app / controllers / site_controller.rb
index 5ca5c0aabcdda8202fef65b8fd51b2ca015e604d..c727f86d9a55ab5084da81ce8ad637040024e500 100644 (file)
@@ -92,8 +92,8 @@ class SiteController < ApplicationController
       @lat = note.lat
       @lon = note.lon
       @zoom = 17
-    elsif params[:gpx] && @user
-      trace = Trace.visible_to(@user).find(params[:gpx])
+    elsif params[:gpx] && current_user
+      trace = Trace.visible_to(current_user).find(params[:gpx])
       @lat = trace.latitude
       @lon = trace.longitude
       @zoom = 16