From 286e56ffe7807421b2b4a72e8386e9eb83767313 Mon Sep 17 00:00:00 2001 From: Pablo Torres Date: Sun, 2 Dec 2012 16:43:47 -0500 Subject: Standardize use of "route globbing" and "wildcard segments" [ci skip] --- guides/source/routing.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'guides/source') diff --git a/guides/source/routing.md b/guides/source/routing.md index 45eef7443b..714c0b609e 100644 --- a/guides/source/routing.md +++ b/guides/source/routing.md @@ -707,7 +707,7 @@ end Both the `matches?` method and the lambda gets the `request` object as an argument. -### Route Globbing +### Route Globbing and Wildcard Segments Route globbing is a way to specify that a particular parameter should be matched to all the remaining parts of a route. For example: @@ -715,7 +715,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"`. +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". Wildcard segments can occur anywhere in a route. For example: @@ -733,7 +733,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'`. -NOTE: Starting from Rails 3.1, wildcard routes will always match the optional format segment by default. For example if you have this route: +NOTE: Starting from Rails 3.1, wildcard segments will always match the optional format segment by default. For example if you have this route: ```ruby get '*pages', to: 'pages#show' -- cgit v1.2.3