]> git.openstreetmap.org Git - rails.git/blob - app/controllers/site_controller.rb
Make sure the diary link in the LHS navigation goes to the global diary.
[rails.git] / app / controllers / site_controller.rb
1 class SiteController < ApplicationController
2   before_filter :authorize_web
3   before_filter :require_user, :only => [:edit]
4
5   def goto_way
6     way = Way.find(params[:id])
7
8     begin
9       node = way.way_segments.first.segment.from_node
10       redirect_to :controller => 'site', :action => 'index', :lat => node.latitude, :lon => node.longitude, :zoom => 6
11     rescue
12       redirect_to :back
13     end
14   end
15
16 end