mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #16799 from rramsden/fix-typo
[ci skip] Fix typo in rails guide for routing
This commit is contained in:
commit
b8fbcc0787
1 changed files with 1 additions and 1 deletions
|
@ -756,7 +756,7 @@ get '*a/foo/*b', to: 'test#index'
|
||||||
|
|
||||||
would match `zoo/woo/foo/bar/baz` with `params[:a]` equals `'zoo/woo'`, and `params[:b]` equals `'bar/baz'`.
|
would match `zoo/woo/foo/bar/baz` with `params[:a]` equals `'zoo/woo'`, and `params[:b]` equals `'bar/baz'`.
|
||||||
|
|
||||||
NOTE: By requesting `'/foo/bar.json'`, your `params[:pages]` will be equals to `'foo/bar'` with the request format of JSON. If you want the old 3.0.x behavior back, you could supply `format: false` like this:
|
NOTE: By requesting `'/foo/bar.json'`, your `params[:pages]` will be equal to `'foo/bar'` with the request format of JSON. If you want the old 3.0.x behavior back, you could supply `format: false` like this:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
get '*pages', to: 'pages#show', format: false
|
get '*pages', to: 'pages#show', format: false
|
||||||
|
|
Loading…
Reference in a new issue