From: Tom Hughes Date: Fri, 20 Dec 2024 09:27:48 +0000 (+0000) Subject: Don't map multiple paths in a single route X-Git-Tag: live~55^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/8aeb16a50c3cd55c953aaec8dcc2b881fb132c88?hp=-c Don't map multiple paths in a single route This is deprecated in rails 8.0 and 8.1 will remove it. --- 8aeb16a50c3cd55c953aaec8dcc2b881fb132c88 diff --git a/config/routes.rb b/config/routes.rb index 0467c59c8..aae32527a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -126,7 +126,8 @@ OpenStreetMap::Application.routes.draw do get "/relation/:id/history" => "old_relations#index", :id => /\d+/, :as => :relation_history resources :old_relations, :path => "/relation/:id/history", :id => /\d+/, :version => /\d+/, :param => :version, :only => :show resources :changesets, :path => "changeset", :id => /\d+/, :only => :show do - match :subscribe, :unsubscribe, :on => :member, :via => [:get, :post] + match :subscribe, :on => :member, :via => [:get, :post] + match :unsubscribe, :on => :member, :via => [:get, :post] namespace :changeset_comments, :as => :comments, :path => :comments do resource :feed, :only => :show, :defaults => { :format => "rss" } @@ -257,7 +258,8 @@ OpenStreetMap::Application.routes.draw do scope "/user/:display_name" do resources :diary_entries, :path => "diary", :only => [:edit, :update, :show], :id => /\d+/ do member do - post :hide, :unhide + post :hide + post :unhide end end end