]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/site_controller.rb
Allow trace descriptions and tags to be edited.
[rails.git] / app / controllers / site_controller.rb
index f4ccd3c742cc7e1ebb9fd1e56a98d7ae2ce86a62..748200834f1298c97a1824870ea1574a9002e575 100644 (file)
@@ -1,7 +1,16 @@
 class SiteController < ApplicationController
   before_filter :authorize_web
   before_filter :require_user, :only => [:edit]
-  def index
 
+  def goto_way
+    way = Way.find(params[:id])
+
+    begin
+      node = way.way_segments.first.segment.from_node
+      redirect_to :controller => 'site', :action => 'index', :lat => node.latitude, :lon => node.longitude, :zoom => 6
+    rescue
+      redirect_to :back
+    end
   end
+
 end