Permalink
Browse files

Merge pull request #9446 from bemurphy/enhance_root_route_guide

Add routing guide doc on root with namespaces. [ci skip]
  • Loading branch information...
2 parents fcf8d6e + a025cd7 commit 00f80029068223143d2eec570eebb3055eea1795 @carlosantoniodasilva carlosantoniodasilva committed Feb 26, 2013
Showing with 10 additions and 0 deletions.
  1. +10 −0 guides/source/routing.md
View
@@ -797,6 +797,16 @@ You should put the `root` route at the top of the file, because it is the most p
NOTE: The `root` route only routes `GET` requests to the action.
+You can also use root inside namespaces and scopes as well. For example:
+
+```ruby
+namespace :admin do
+ root to: "admin#index"
+end
+
+root to: "home#index"
+```
+
### Unicode character routes
You can specify unicode character routes directly. For example:

0 comments on commit 00f8002

Please sign in to comment.