From fa9e8b85a62f5908d856e0fbe5a7c9a90690a7bb Mon Sep 17 00:00:00 2001 From: Tim Felgentreff Date: Thu, 4 Aug 2011 20:48:27 -0700 Subject: [PATCH] fix routing, precedence for ProjectsController for 'new' and 'index' actions --- config/routes.rb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 54cf11a01c..cc78da945a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,10 +1,15 @@ ActionController::Routing::Routes.draw do |map| + map.with_options :controller => 'projects' do |p| + p.connect 'projects', :action => 'index' + p.connect 'projects/new', :action => 'new' + end + map.with_options :controller => 'my_projects_overviews' do |my| my.connect 'projects/:id', :action => 'index' - my.connect 'projects/:id/page_layout', :action => 'page_layout' - my.connect 'projects/:id/page_layout/update_custom_element', :action => 'update_custom_element' - my.connect 'my_projects_overview/:id/add_block', :action => 'add_block' - my.connect 'my_projects_overview/:id/remove_block', :action => 'remove_block' - my.connect 'my_projects_overview/:id/order_blocks', :action => 'order_blocks' + my.connect 'my_projects_overview/:id/page_layout', :action => 'page_layout' + my.connect 'my_projects_overview/:id/page_layout/add_block', :action => 'add_block' + my.connect 'my_projects_overview/:id/page_layout/remove_block', :action => 'remove_block' + my.connect 'my_projects_overview/:id/page_layout/order_blocks', :action => 'order_blocks' + my.connect 'my_projects_overview/:id/page_layout/update_custom_element', :action => 'update_custom_element' end end