From 0cc483aa14d79b2d07fdc71dbd935d1af8361d71 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Thu, 19 Aug 2010 14:42:14 +0100 Subject: Move edit route before show route so that it will have precedence if the :id parameter allows slashes [#5409 state:resolved] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- actionpack/lib/action_dispatch/routing/mapper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index c6bbfdb441..26ca2ca818 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -586,10 +586,10 @@ module ActionDispatch end if parent_resource.actions.include?(:new) member_scope do + get :edit if parent_resource.actions.include?(:edit) get :show if parent_resource.actions.include?(:show) put :update if parent_resource.actions.include?(:update) delete :destroy if parent_resource.actions.include?(:destroy) - get :edit if parent_resource.actions.include?(:edit) end end @@ -616,10 +616,10 @@ module ActionDispatch end if parent_resource.actions.include?(:new) member_scope do + get :edit if parent_resource.actions.include?(:edit) get :show if parent_resource.actions.include?(:show) put :update if parent_resource.actions.include?(:update) delete :destroy if parent_resource.actions.include?(:destroy) - get :edit if parent_resource.actions.include?(:edit) end end -- cgit v1.2.3