Permalink
Browse files

Redirect block with arity of 1 is deprecated.

  • Loading branch information...
1 parent b883595 commit 150c6dc30f20f46c90c289704150268b7fb9edd9 @semaperepelitsa semaperepelitsa committed Sep 6, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 guides/source/routing.textile
View
4 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>

0 comments on commit 150c6dc

Please sign in to comment.