Skip to content

Commit

Permalink
Don't map multiple paths in a single route
Browse files Browse the repository at this point in the history
This is deprecated in rails 8.0 and 8.1 will remove it.
  • Loading branch information
tomhughes committed Dec 20, 2024
1 parent e2904da commit 8aeb16a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@
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" }
Expand Down Expand Up @@ -257,7 +258,8 @@
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
Expand Down

0 comments on commit 8aeb16a

Please sign in to comment.