mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Should be "match" instead of "map"
This commit is contained in:
@@ -560,13 +560,13 @@ would match +zoo/woo/foo/bar/baz+ with +params[:a]+ equals +"zoo/woo"+, and +par
|
||||
NOTE: Starting from Rails 3.1, wildcard routes will always match the optional format segment by default. For example if you have this route:
|
||||
|
||||
<ruby>
|
||||
map '*pages' => 'pages#show'
|
||||
match '*pages' => 'pages#show'
|
||||
</ruby>
|
||||
|
||||
NOTE: By requesting +"/foo/bar.json"+, your +params[:pages]+ will be equals to +"foo/bar"+ with the request format of JSON. If you want the old 3.0.x behavior back, you could supply +:format => false+ like this:
|
||||
|
||||
<ruby>
|
||||
map '*pages' => 'pages#show', :format => false
|
||||
match '*pages' => 'pages#show', :format => false
|
||||
</ruby>
|
||||
|
||||
h4. Redirection
|
||||
|
||||
Reference in New Issue
Block a user