diff options
author | Gaurish Sharma <contact@gaurishsharma.com> | 2012-05-22 19:51:02 +0530 |
---|---|---|
committer | Gaurish Sharma <contact@gaurishsharma.com> | 2012-05-22 19:51:02 +0530 |
commit | 43fa48e5aa981bf86635fa31ace9eede24e93826 (patch) | |
tree | 61da0cecd77758b9d1052c99bc24bf1af3228741 | |
parent | 6b9f077c85e375bc8089fdc14be6574b9236d7ee (diff) | |
download | rails-43fa48e5aa981bf86635fa31ace9eede24e93826.tar.gz rails-43fa48e5aa981bf86635fa31ace9eede24e93826.tar.bz2 rails-43fa48e5aa981bf86635fa31ace9eede24e93826.zip |
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
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/routes.rb | 7 |
1 files changed, 4 insertions, 3 deletions
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 |