diff options
-rw-r--r-- | actionpack/CHANGELOG.md | 2 | ||||
-rw-r--r-- | railties/guides/source/routing.textile | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index 96ad3a155c..869d4704dd 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -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* 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. |