diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-02-26 09:49:50 -0800 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-02-26 09:49:50 -0800 |
commit | 00f80029068223143d2eec570eebb3055eea1795 (patch) | |
tree | e6cf8c83a19a44ea09284ed757f11dc10d1ee6d0 /guides | |
parent | fcf8d6e40f516de30dd6805f5a988e4c20701878 (diff) | |
parent | a025cd743cbe26a9ff1a662fb9e6aa917bebd842 (diff) | |
download | rails-00f80029068223143d2eec570eebb3055eea1795.tar.gz rails-00f80029068223143d2eec570eebb3055eea1795.tar.bz2 rails-00f80029068223143d2eec570eebb3055eea1795.zip |
Merge pull request #9446 from bemurphy/enhance_root_route_guide
Add routing guide doc on root with namespaces. [ci skip]
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/routing.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/guides/source/routing.md b/guides/source/routing.md index 8c8ac34862..d7a4a237ed 100644 --- a/guides/source/routing.md +++ b/guides/source/routing.md @@ -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: |