]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/site_controller.rb
Send an email notification out when a new message is waiting on the site for you.
[rails.git] / app / controllers / site_controller.rb
index d01b86bba5395b6ed0347474665190d2249e0f37..748200834f1298c97a1824870ea1574a9002e575 100644 (file)
@@ -1,5 +1,16 @@
 class SiteController < ApplicationController
-  def index
+  before_filter :authorize_web
+  before_filter :require_user, :only => [:edit]
 
+  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