From 43fa48e5aa981bf86635fa31ace9eede24e93826 Mon Sep 17 00:00:00 2001 From: Gaurish Sharma Date: Tue, 22 May 2012 19:51:02 +0530 Subject: Move root method at TOP of routes file Made the change as per the following text in routing guide:- "You should put the root route at the top of the file, because it is the most popular route and should be matched first." However, if root is best left at bottom. We will change to fix that text --- railties/lib/rails/generators/rails/app/templates/config/routes.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'railties/lib/rails/generators') diff --git a/railties/lib/rails/generators/rails/app/templates/config/routes.rb b/railties/lib/rails/generators/rails/app/templates/config/routes.rb index 286e93c3cf..303e47877f 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/routes.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/routes.rb @@ -1,6 +1,10 @@ <%= app_const %>.routes.draw do # The priority is based upon order of creation: # first created -> highest priority. + + # You can have the root of your site routed with "root" + # just remember to delete public/index.html. + # root :to => 'welcome#index' # Sample of regular route: # get 'products/:id' => 'catalog#view' @@ -46,9 +50,6 @@ # resources :products # end - # You can have the root of your site routed with "root" - # just remember to delete public/index.html. - # root :to => 'welcome#index' # See how all your routes lay out with "rake routes" end \ No newline at end of file -- cgit v1.2.3