X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8aeb16a50c3cd55c953aaec8dcc2b881fb132c88..3b0748831aa249b2beeb593641dfec06f980b6c8:/config/routes.rb?ds=sidebyside diff --git a/config/routes.rb b/config/routes.rb index aae32527a..ccc32c773 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -80,13 +80,12 @@ OpenStreetMap::Application.routes.draw do end end - resources :messages, :path => "user/messages", :constraints => { :id => /\d+/ }, :only => [:create, :show, :update, :destroy] do - collection do - get "inbox" - get "outbox" - end + resources :messages, :path => "user/messages", :constraints => { :id => /\d+/ }, :only => [:create, :show, :update, :destroy] + namespace :messages, :path => "user/messages" do + resource :inbox, :only => :show + resource :outbox, :only => :show end - post "/user/messages/:id" => "messages#update" + post "/user/messages/:id" => "messages#update", :as => nil resources :traces, :path => "gpx", :only => [:create, :show, :update, :destroy], :id => /\d+/ do scope :module => :traces do @@ -333,8 +332,7 @@ OpenStreetMap::Application.routes.draw do # banning pages get "/user/:display_name/blocks" => "user_blocks#blocks_on", :as => "user_blocks_on" get "/user/:display_name/blocks_by" => "user_blocks#blocks_by", :as => "user_blocks_by" - get "/blocks/new/:display_name" => "user_blocks#new", :as => "new_user_block" - resources :user_blocks, :except => :new + resources :user_blocks, :path_names => { :new => "new/:display_name" } match "/user/:display_name/blocks/revoke_all" => "user_blocks#revoke_all", :via => [:get, :post], :as => "revoke_all_user_blocks" # issues and reports