aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/routing.textile
diff options
context:
space:
mode:
authorSemyon Perepelitsa <sema@sema.in>2012-09-06 23:23:05 +0800
committerSemyon Perepelitsa <sema@sema.in>2012-09-06 23:23:05 +0800
commit150c6dc30f20f46c90c289704150268b7fb9edd9 (patch)
tree40add471e9c70e30adc49e2d495ab0975594b03f /guides/source/routing.textile
parentb883595e55c1cd6b5bc3ee697d5a8e2c9bc2ab1a (diff)
downloadrails-150c6dc30f20f46c90c289704150268b7fb9edd9.tar.gz
rails-150c6dc30f20f46c90c289704150268b7fb9edd9.tar.bz2
rails-150c6dc30f20f46c90c289704150268b7fb9edd9.zip
Redirect block with arity of 1 is deprecated.
Diffstat (limited to 'guides/source/routing.textile')
-rw-r--r--guides/source/routing.textile4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/routing.textile b/guides/source/routing.textile
index bed7d03e06..9718887612 100644
--- a/guides/source/routing.textile
+++ b/guides/source/routing.textile
@@ -644,10 +644,10 @@ You can also reuse dynamic segments from the match in the path to redirect to:
get "/stories/:name" => redirect("/posts/%{name}")
</ruby>
-You can also provide a block to redirect, which receives the params and (optionally) the request object:
+You can also provide a block to redirect, which receives the params and the request object:
<ruby>
-get "/stories/:name" => redirect {|params| "/posts/#{params[:name].pluralize}" }
+get "/stories/:name" => redirect {|params, req| "/posts/#{params[:name].pluralize}" }
get "/stories" => redirect {|p, req| "/posts/#{req.subdomain}" }
</ruby>