diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-04-01 00:37:31 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-04-01 00:37:31 -0300 |
commit | a6ecc06ecefa9b57116f26c1b545f545fadeb0ed (patch) | |
tree | baf4cf845f44af4b3fda67d900afd3789b20eb87 /guides | |
parent | e3e28e4dab69c6707e123b9185d07ae1aaed46ea (diff) | |
parent | 21a2d9a9871af731733bb2fcf31006139b2fc708 (diff) | |
download | rails-a6ecc06ecefa9b57116f26c1b545f545fadeb0ed.tar.gz rails-a6ecc06ecefa9b57116f26c1b545f545fadeb0ed.tar.bz2 rails-a6ecc06ecefa9b57116f26c1b545f545fadeb0ed.zip |
Merge pull request #19605 from 1337807/patch-1
Update routing.md
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/routing.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/guides/source/routing.md b/guides/source/routing.md index 7d0a3efbe7..4ccc50a4d9 100644 --- a/guides/source/routing.md +++ b/guides/source/routing.md @@ -807,6 +807,18 @@ As long as `Sprockets` responds to `call` and returns a `[status, headers, body] NOTE: For the curious, `'articles#index'` actually expands out to `ArticlesController.action(:index)`, which returns a valid Rack application. +If you specify a rack application as the endpoint for a matcher remember that the route will be unchanged in the receiving application. With the following route your rack application should expect the route to be '/admin': + +```ruby +match '/admin', to: AdminApp, via: :all +``` + +If you would prefer to have your rack application receive requests at the root path instead use mount: + +```ruby +mount AdminApp, at: '/admin' +``` + ### Using `root` You can specify what Rails should route `'/'` to with the `root` method: |