aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2012-03-05 22:41:13 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2012-03-05 22:46:06 +0530
commitcf75417f229224fc05257ea6ddaa28a0f1a39d0f (patch)
tree26db1d3dbc9492375134059c1b58e7c130423ace /railties/guides/source
parent64d8d24495bfdeeccbe1908e398c2c09e2b8c0fe (diff)
downloadrails-cf75417f229224fc05257ea6ddaa28a0f1a39d0f.tar.gz
rails-cf75417f229224fc05257ea6ddaa28a0f1a39d0f.tar.bz2
rails-cf75417f229224fc05257ea6ddaa28a0f1a39d0f.zip
document the shortcut to the root route helper [ci skip]
This was implemented in 2ee4dd856d47113625589bc5410b5a6669ea02d5
Diffstat (limited to 'railties/guides/source')
-rw-r--r--railties/guides/source/routing.textile1
1 files changed, 1 insertions, 0 deletions
diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile
index 42665114be..c5567b3350 100644
--- a/railties/guides/source/routing.textile
+++ b/railties/guides/source/routing.textile
@@ -622,6 +622,7 @@ You can specify what Rails should route +"/"+ to with the +root+ method:
<ruby>
root :to => 'pages#main'
+root 'pages#main' # shortcut for the above
</ruby>
You should put the +root+ route at the top of the file, because it is the most popular route and should be matched first. You also need to delete the +public/index.html+ file for the root route to take effect.