You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Route globbing is a way to specify that a particular parameter should be matched to all the remaining parts of a route. For example:
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:
would match
books/some/section/last-words-a-memoir
with_params['section'] equals 'some/section'
, and_params['title'] equals 'last-words-a-memoir'
.Technically, a route can have even more than one wildcard segment. The matcher assigns segments to parameters in an intuitive way. For example:
would match
zoo/woo/foo/bar/baz
with_params['a'] equals 'zoo/woo'
, and_params['b'] equals 'bar/baz'
.The text was updated successfully, but these errors were encountered: