This project is archived and is in readonly mode.

#5409 ✓resolved
Andrew White

Show route is matched instead of edit if resource :id regexp is greedy

Reported by Andrew White | August 19th, 2010 @ 02:41 PM | in 3.0.2

The current order of resource routes means that if the :id regexp is greedy it will match show rather than edit, e.g:

resources :sections, :id => /.+/

# GET /sections/1/edit
=> { :controller => 'sections', :action => 'show', :id => '1/edit' }

The attached patch resolves this by moving the edit route before the show route.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket


Referenced by