aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/routing.md
diff options
context:
space:
mode:
authorPablo Torres <tn.pablo@gmail.com>2012-12-02 16:43:47 -0500
committerPablo Torres <tn.pablo@gmail.com>2012-12-02 16:57:47 -0500
commit286e56ffe7807421b2b4a72e8386e9eb83767313 (patch)
tree99fdf21ac23a66c647de7490ee2d24ce8319f329 /guides/source/routing.md
parent1d36963754d4bb0fdd563c3354ff8aae805577a0 (diff)
downloadrails-286e56ffe7807421b2b4a72e8386e9eb83767313.tar.gz
rails-286e56ffe7807421b2b4a72e8386e9eb83767313.tar.bz2
rails-286e56ffe7807421b2b4a72e8386e9eb83767313.zip
Standardize use of "route globbing" and "wildcard segments" [ci skip]
Diffstat (limited to 'guides/source/routing.md')
-rw-r--r--guides/source/routing.md6
1 files changed, 3 insertions, 3 deletions
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'