Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix redirect with block example

  • Loading branch information...
commit 8d2487d9d458914bebb83fc74a6957f56dc0a8b5 1 parent 86b30c4
@avakhov avakhov authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 actionpack/lib/action_dispatch/routing/redirection.rb
View
6 actionpack/lib/action_dispatch/routing/redirection.rb
@@ -67,10 +67,10 @@ module Redirection
# 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.
Please sign in to comment.
Something went wrong with that request. Please try again.