aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGaurish Sharma <contact@gaurishsharma.com>2012-05-22 19:51:02 +0530
committerGaurish Sharma <contact@gaurishsharma.com>2012-05-22 19:51:02 +0530
commit43fa48e5aa981bf86635fa31ace9eede24e93826 (patch)
tree61da0cecd77758b9d1052c99bc24bf1af3228741
parent6b9f077c85e375bc8089fdc14be6574b9236d7ee (diff)
downloadrails-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.rb7
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