Skip to content

Commit

Permalink
document the shortcut to the root route helper [ci skip]
Browse files Browse the repository at this point in the history
This was implemented in 2ee4dd8
  • Loading branch information
vijaydev committed Mar 5, 2012
1 parent 64d8d24 commit cf75417
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions actionpack/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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*
Expand Down
1 change: 1 addition & 0 deletions railties/guides/source/routing.textile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit cf75417

Please sign in to comment.