1
0
mirror of https://github.com/actix/actix-website synced 2024-11-30 11:12:57 +01:00

Update url-dispatch.md (#129)

* Update url-dispatch.md

Description was updated according to an example.

Users paths were added instead of projects and tasks.

Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
This commit is contained in:
Nikita Puzankov 2019-12-26 18:15:39 +04:00 committed by Yuki Okushi
parent fd9b6d38ba
commit c6c5446937

View File

@ -235,13 +235,11 @@ foo/abc/def/a/b/c -> Params{'bar':u'abc', 'tail': 'def/a/b/c'}
Scoping helps you organize routes sharing common root paths. You can nest Scoping helps you organize routes sharing common root paths. You can nest
scopes within scopes. scopes within scopes.
Suppose that you want to organize paths to endpoints used to manage a "Project", Suppose that you want to organize paths to endpoints used to view "Users". Such paths may include:
consisting of "Tasks". Such paths may include:
- /project - /users
- /project/{project_id} - /users/show
- /project/{project_id}/task - /users/show/{id}
- /project/{project_id}/task/{task_id}
A scoped layout of these paths would appear as follows A scoped layout of these paths would appear as follows