diff options
author | Alexey Vakhov <vakhov@gmail.com> | 2012-04-17 15:39:46 +0400 |
---|---|---|
committer | Alexey Vakhov <vakhov@gmail.com> | 2012-04-17 15:39:46 +0400 |
commit | 8d2487d9d458914bebb83fc74a6957f56dc0a8b5 (patch) | |
tree | d8ee9c9e1e5c135928ebc5c795000304857b74f3 /actionpack/lib/action_dispatch | |
parent | 86b30c4347640965a6b3ae6a52c5ca9691a585c0 (diff) | |
download | rails-8d2487d9d458914bebb83fc74a6957f56dc0a8b5.tar.gz rails-8d2487d9d458914bebb83fc74a6957f56dc0a8b5.tar.bz2 rails-8d2487d9d458914bebb83fc74a6957f56dc0a8b5.zip |
Fix redirect with block example
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/redirection.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/routing/redirection.rb b/actionpack/lib/action_dispatch/routing/redirection.rb index 617b24b46a..797ef84312 100644 --- a/actionpack/lib/action_dispatch/routing/redirection.rb +++ b/actionpack/lib/action_dispatch/routing/redirection.rb @@ -67,10 +67,10 @@ module ActionDispatch # params, depending of how many arguments your block accepts. A string is required as a # return value. # - # match 'jokes/:number', :to => redirect do |params, request| + # match 'jokes/:number', :to => redirect { |params, request| # path = (params[:number].to_i.even? ? "/wheres-the-beef" : "/i-love-lamp") - # "http://#{request.host_with_port}/#{path}" - # end + # "http://#{request.host_with_port}#{path}" + # } # # The options version of redirect allows you to supply only the parts of the url which need # to change, it also supports interpolation of the path similar to the first example. |