aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorHendy Tanata <htanata@gmail.com>2011-07-15 21:56:03 +0800
committerHendy Tanata <htanata@gmail.com>2011-07-15 22:24:04 +0800
commit0894d73c7552a4c7d576b7d3692c6a18faadd273 (patch)
tree97be6e675b2fda72186a32e12cc1c24f42b3f5fe /railties
parent28d5d22f5a1e3a535d86ad06f4dc8220e61a8d64 (diff)
downloadrails-0894d73c7552a4c7d576b7d3692c6a18faadd273.tar.gz
rails-0894d73c7552a4c7d576b7d3692c6a18faadd273.tar.bz2
rails-0894d73c7552a4c7d576b7d3692c6a18faadd273.zip
Fix wildcard route code examples.
Should be "match" instead of "map".
Diffstat (limited to 'railties')
-rw-r--r--railties/guides/source/routing.textile4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile
index 06b3579720..57e390f385 100644
--- a/railties/guides/source/routing.textile
+++ b/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