Permalink
Browse files

document the shortcut to the root route helper [ci skip]

This was implemented in 2ee4dd8
  • Loading branch information...
1 parent 64d8d24 commit cf75417f229224fc05257ea6ddaa28a0f1a39d0f @vijaydev vijaydev committed Mar 5, 2012
Showing with 3 additions and 0 deletions.
  1. +2 −0 actionpack/CHANGELOG.md
  2. +1 −0 railties/guides/source/routing.textile
View
@@ -1,5 +1,7 @@
## Rails 4.0.0 (unreleased) ##
+* Allows the route helper `root` to take a string argument. For example, `root 'pages#main'`. *bcardarella*
+
* Forms of persisted records use always PATCH (via the `_method` hack). *fxn*
* For resources, both PATCH and PUT are routed to the `update` action. *fxn*
@@ -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.

0 comments on commit cf75417

Please sign in to comment.