Redirect ?node=n and similar to browse pages
[rails.git] / app / controllers / site_controller.rb
index 4945aaa4ff2793457ff0caccd2a20afd321cb411..32a0f8cb5214619c6975842dfd500fe32bc14815 100644 (file)
@@ -97,7 +97,15 @@ class SiteController < ApplicationController
       anchor << "layers=N"
     end
 
-    if anchor.present?
+    if params[:node]
+      redirect_to node_path(params[:node])
+    elsif params[:way]
+      redirect_to way_path(params[:way])
+    elsif params[:relation]
+      redirect_to relation_path(params[:relation])
+    elsif params[:note]
+      redirect_to browse_note_path(params[:note])
+    elsif anchor.present?
       redirect_to params.merge(:anchor => anchor.join('&'))
     end
   end