X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/c8af388ac2009da2cd36fbd9434237db25e8d687..6c48d06a585c2a1452ca55d6059202bf7dfd1d58:/config/routes.rb diff --git a/config/routes.rb b/config/routes.rb index 842da82b3..1633e2b26 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -109,16 +109,18 @@ OpenStreetMap::Application.routes.draw do end # Data browsing - get "/way/:id" => "browse#way", :id => /\d+/, :as => :way - get "/way/:id/history" => "browse#way_history", :id => /\d+/, :as => :way_history + get "/way/:id" => "ways#show", :id => /\d+/, :as => :way + get "/way/:id/history" => "old_ways#index", :id => /\d+/, :as => :way_history resources :old_ways, :path => "/way/:id/history", :id => /\d+/, :version => /\d+/, :param => :version, :only => :show - get "/node/:id" => "browse#node", :id => /\d+/, :as => :node - get "/node/:id/history" => "browse#node_history", :id => /\d+/, :as => :node_history + get "/node/:id" => "nodes#show", :id => /\d+/, :as => :node + get "/node/:id/history" => "old_nodes#index", :id => /\d+/, :as => :node_history resources :old_nodes, :path => "/node/:id/history", :id => /\d+/, :version => /\d+/, :param => :version, :only => :show - get "/relation/:id" => "browse#relation", :id => /\d+/, :as => :relation - get "/relation/:id/history" => "browse#relation_history", :id => /\d+/, :as => :relation_history + get "/relation/:id" => "relations#show", :id => /\d+/, :as => :relation + get "/relation/:id/history" => "old_relations#index", :id => /\d+/, :as => :relation_history resources :old_relations, :path => "/relation/:id/history", :id => /\d+/, :version => /\d+/, :param => :version, :only => :show - resources :changesets, :path => "changeset", :id => /\d+/, :only => :show + resources :changesets, :path => "changeset", :id => /\d+/, :only => :show do + match :subscribe, :unsubscribe, :on => :member, :via => [:get, :post] + end get "/changeset/:id/comments/feed" => "changeset_comments#index", :as => :changeset_comments_feed, :id => /\d*/, :defaults => { :format => "rss" } resources :notes, :path => "note", :only => [:show, :new] @@ -127,8 +129,6 @@ OpenStreetMap::Application.routes.draw do get "/user/:display_name/notes" => "notes#index", :as => :user_notes get "/history/friends" => "changesets#index", :friends => true, :as => "friend_changesets", :defaults => { :format => :html } get "/history/nearby" => "changesets#index", :nearby => true, :as => "nearby_changesets", :defaults => { :format => :html } - match "/changeset/:id/subscribe" => "changesets#subscribe", :via => [:get, :post], :as => "changeset_subscribe" - match "/changeset/:id/unsubscribe" => "changesets#unsubscribe", :via => [:get, :post], :as => "changeset_unsubscribe" get "/browse/way/:id", :to => redirect(:path => "/way/%{id}") get "/browse/way/:id/history", :to => redirect(:path => "/way/%{id}/history") @@ -209,8 +209,10 @@ OpenStreetMap::Application.routes.draw do get "/user/:display_name/traces/tag/:tag/rss" => "traces#georss", :defaults => { :format => :rss } get "/user/:display_name/traces/rss" => "traces#georss", :defaults => { :format => :rss } get "/user/:display_name/traces/:id" => "traces#show", :as => "show_trace" - get "/user/:display_name/traces/:id/picture" => "traces#picture", :as => "trace_picture" - get "/user/:display_name/traces/:id/icon" => "traces#icon", :as => "trace_icon" + scope "/user/:display_name/traces/:trace_id", :module => :traces do + get "picture" => "pictures#show", :as => "trace_picture" + get "icon" => "icons#show", :as => "trace_icon" + end get "/traces/tag/:tag/page/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/traces/tag/%{tag}") get "/traces/tag/:tag" => "traces#index" get "/traces/page/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/traces")