mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Squashed commit of the following:
commit 4a3d295f3011e771cddead80de7497ca15d15c13 Author: Yauheni Dakuka <yauheni.dakuka@gmail.com> Date: Fri Jul 28 14:31:35 2017 +0300 Update routing.md commit 620a4ce47288e3ef6504290c78f931214968e7e3 Author: Yauheni Dakuka <yauheni.dakuka@gmail.com> Date: Fri Jul 28 14:19:29 2017 +0300 [ci skip] update routing guide
This commit is contained in:
parent
490c5a742f
commit
0e523ffc28
1 changed files with 3 additions and 3 deletions
|
@ -418,7 +418,7 @@ resources :articles do
|
|||
end
|
||||
```
|
||||
|
||||
Also you can use them in any place that you want inside the routes, for example in a scope or namespace call:
|
||||
Also you can use them in any place that you want inside the routes, for example in a `scope` or `namespace` call:
|
||||
|
||||
```ruby
|
||||
namespace :articles do
|
||||
|
@ -808,14 +808,14 @@ NOTE: For the curious, `'articles#index'` actually expands out to `ArticlesContr
|
|||
|
||||
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':
|
||||
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:
|
||||
path instead, use `mount`:
|
||||
|
||||
```ruby
|
||||
mount AdminApp, at: '/admin'
|
||||
|
|
Loading…
Reference in a new issue