]> git.openstreetmap.org Git - rails.git/commitdiff
Put the resourceful routing at the top of the list, for clarity
authorAndy Allan <git@gravitystorm.co.uk>
Thu, 30 Aug 2018 01:48:57 +0000 (09:48 +0800)
committerAndy Allan <git@gravitystorm.co.uk>
Thu, 30 Aug 2018 01:48:57 +0000 (09:48 +0800)
config/routes.rb

index e912871e47265026c5d3d0e40b2e856bea22a73b..e277aba86e90ab07e1a4d0228f55a682cb9d8cb3 100644 (file)
@@ -189,6 +189,7 @@ OpenStreetMap::Application.routes.draw do
   post "/preview/:type" => "site#preview", :as => :preview
 
   # traces
+  resources :traces, :except => [:show]
   get "/user/:display_name/traces/tag/:tag/page/:page" => "traces#index", :page => /[1-9][0-9]*/
   get "/user/:display_name/traces/tag/:tag" => "traces#index"
   get "/user/:display_name/traces/page/:page" => "traces#index", :page => /[1-9][0-9]*/
@@ -207,7 +208,6 @@ 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 => [:index, :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"