1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #39775 from mehagar/segment_instead_of_fragment

Use segment instead of fragment in docs [ci-skip]
This commit is contained in:
Vipul A M 2020-07-02 19:41:51 +05:30 committed by GitHub
commit 86480e71fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -592,7 +592,7 @@ TIP: By default, dynamic segments don't accept dots - this is because the dot is
### Static Segments
You can specify static segments when creating a route by not prepending a colon to a fragment:
You can specify static segments when creating a route by not prepending a colon to a segment:
```ruby
get 'photos/:id/with_user/:user_id', to: 'photos#show'
@ -759,7 +759,7 @@ Route globbing is a way to specify that a particular parameter should be matched
get 'photos/*other', to: 'photos#unknown'
```
This route would match `photos/12` or `/photos/long/path/to/12`, setting `params[:other]` to `"12"` or `"long/path/to/12"`. The fragments prefixed with a star are called "wildcard segments".
This route would match `photos/12` or `/photos/long/path/to/12`, setting `params[:other]` to `"12"` or `"long/path/to/12"`. The segments prefixed with a star are called "wildcard segments".
Wildcard segments can occur anywhere in a route. For example: