Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix wildcard route code examples.

Should be "match" instead of "map".
  • Loading branch information...
commit 0894d73c7552a4c7d576b7d3692c6a18faadd273 1 parent 28d5d22
@htanata htanata authored
Showing with 4 additions and 4 deletions.
  1. +2 −2 actionpack/CHANGELOG
  2. +2 −2 railties/guides/source/routing.textile
View
4 actionpack/CHANGELOG
@@ -101,11 +101,11 @@
For example if you have this route:
- map '*pages' => 'pages#show'
+ match '*pages' => 'pages#show'
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:
- map '*pages' => 'pages#show', :format => false
+ match '*pages' => 'pages#show', :format => false
* Added Base.http_basic_authenticate_with to do simple http basic authentication with a single class method call [DHH]
View
4 railties/guides/source/routing.textile
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.