aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/routing.textile
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2012-09-09 17:38:47 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2012-09-09 17:38:47 +0530
commitcb524dc1d7525a26ecea8cf049757e530f0d4026 (patch)
tree3a2d8727e97c67e37a357c1cf180e9ca17cff28b /guides/source/routing.textile
parent6107407e66aa68cf269ec00b64d7ab3623465b97 (diff)
parent2db79dc9ea0b623c6d76b72e85f58efd63b50e08 (diff)
downloadrails-cb524dc1d7525a26ecea8cf049757e530f0d4026.tar.gz
rails-cb524dc1d7525a26ecea8cf049757e530f0d4026.tar.bz2
rails-cb524dc1d7525a26ecea8cf049757e530f0d4026.zip
Merge branch 'master' of github.com:lifo/docrails
Conflicts: activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
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>