1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Update routing guides, root route should be at the top of the file

This commit is contained in:
Alexey Vakhov 2011-10-31 10:36:38 +04:00
parent 2d337ef080
commit d106b34bd5

View file

@ -620,7 +620,7 @@ You can specify what Rails should route +"/"+ to with the +root+ method:
root :to => 'pages#main'
</ruby>
You should put the +root+ route at the end of the file. You also need to delete the +public/index.html+ file for the root route to take effect.
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.
h3. Customizing Resourceful Routes