]> git.openstreetmap.org Git - rails.git/blobdiff - config/routes.rb
Use the conventional 'destroy' method name for destroying traces
[rails.git] / config / routes.rb
index 58c05da171e3c2628179d9ab543d7b3d42553306..d61da1ea93872cd20429b60728fa00a91bb5e86c 100644 (file)
@@ -67,11 +67,11 @@ OpenStreetMap::Application.routes.draw do
     get "user/gpx_files" => "api/users#gpx_files"
     get "users" => "api/users#index", :as => :api_users
 
-    get "user/preferences" => "api/user_preferences#read"
-    get "user/preferences/:preference_key" => "api/user_preferences#read_one"
-    put "user/preferences" => "api/user_preferences#update"
-    put "user/preferences/:preference_key" => "api/user_preferences#update_one"
-    delete "user/preferences/:preference_key" => "api/user_preferences#delete_one"
+    get "user/preferences" => "api/user_preferences#index"
+    get "user/preferences/:preference_key" => "api/user_preferences#show"
+    put "user/preferences" => "api/user_preferences#update_all"
+    put "user/preferences/:preference_key" => "api/user_preferences#update"
+    delete "user/preferences/:preference_key" => "api/user_preferences#destroy"
 
     post "gpx/create" => "api/traces#create"
     get "gpx/:id" => "api/traces#show", :id => /\d+/
@@ -208,7 +208,6 @@ OpenStreetMap::Application.routes.draw do
   get "/trace/create", :to => redirect(:path => "/traces/new")
   get "/trace/:id/data" => "traces#data", :id => /\d+/, :as => "trace_data"
   get "/trace/:id/edit", :to => redirect(:path => "/traces/%{id}/edit")
-  post "/trace/:id/delete" => "traces#delete", :id => /\d+/
 
   # diary pages
   resources :diary_entries, :path => "diary", :only => [:new, :create, :index] do