Permalink
Browse files

Standardize use of "route globbing" and "wildcard segments" [ci skip]

  • Loading branch information...
ptn committed Dec 2, 2012
1 parent 1d36963 commit 286e56ffe7807421b2b4a72e8386e9eb83767313
Showing with 3 additions and 3 deletions.
  1. +3 −3 guides/source/routing.md
View
@@ -707,15 +707,15 @@ 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:
```ruby
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'

0 comments on commit 286e56f

Please sign in to comment.