X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b4106383d99ccbf152d79b0f2c9deca95df9fb61..16fef14b61f4cf5222484b7c315ed05c661cbcef:/config/routes.rb diff --git a/config/routes.rb b/config/routes.rb index 0522115f1..410db3c25 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -195,7 +195,7 @@ OpenStreetMap::Application.routes.draw do get "/user/:display_name/traces" => "traces#list" 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#view" + get "/user/:display_name/traces/:id" => "traces#show" get "/user/:display_name/traces/:id/picture" => "traces#picture" get "/user/:display_name/traces/:id/icon" => "traces#icon" get "/traces/tag/:tag/page/:page" => "traces#list", :page => /[1-9][0-9]*/ @@ -208,11 +208,12 @@ OpenStreetMap::Application.routes.draw do get "/traces/mine/tag/:tag" => "traces#mine" get "/traces/mine/page/:page" => "traces#mine" get "/traces/mine" => "traces#mine" - resources :traces, :only => [:new, :create] + resources :traces, :only => [:new, :create, :edit, :update] post "/trace/create" => "traces#create" # remove after deployment get "/trace/create", :to => redirect(:path => "/traces/new") get "/trace/:id/data" => "traces#data", :id => /\d+/, :as => "trace_data" - match "/trace/:id/edit" => "traces#edit", :via => [:get, :post], :id => /\d+/, :as => "trace_edit" + post "trace/:id/edit" => "traces#update" # remove after deployment + get "/trace/:id/edit", :to => redirect(:path => "/traces/%{id}/edit") post "/trace/:id/delete" => "traces#delete", :id => /\d+/ # diary pages @@ -313,4 +314,9 @@ OpenStreetMap::Application.routes.draw do # redactions resources :redactions + + # errors + match "/403", :to => "errors#forbidden", :via => :all + match "/404", :to => "errors#not_found", :via => :all + match "/500", :to => "errors#internal_server_error", :via => :all end