]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/site_controller.rb
Display the image of the user who made the diary entry, not that of
[rails.git] / app / controllers / site_controller.rb
index eebb23301d45050e9e532a0ac6ee5f8a45c3c0a2..767220c7905ed0be8bae70bf324a07f6c1c77be7 100644 (file)
@@ -1,2 +1,16 @@
 class SiteController < ApplicationController
 class SiteController < ApplicationController
+  before_filter :authorize_web
+  before_filter :require_user, :only => [:edit]
+
+  def goto_way
+    way = Way.find(params[:id])
+
+    begin
+      node = way.way_nodes.first.node
+      redirect_to :controller => 'site', :action => 'index', :lat => node.latitude, :lon => node.longitude, :zoom => 6
+    rescue
+      redirect_to :back
+    end
+  end
+
 end
 end