- 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"
-
- post "gpx/create" => "api/traces#api_create"
- get "gpx/:id" => "api/traces#api_read", :id => /\d+/
- put "gpx/:id" => "api/traces#api_update", :id => /\d+/
- delete "gpx/:id" => "api/traces#api_delete", :id => /\d+/
- get "gpx/:id/details" => "api/traces#api_read", :id => /\d+/
- get "gpx/:id/data" => "api/traces#api_data"
+ resources :user_preferences, :except => [:new, :create, :edit], :param => :preference_key, :path => "user/preferences", :controller => "api/user_preferences" do
+ collection do
+ put "" => "api/user_preferences#update_all", :as => ""
+ end
+ end