1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

let's keep the slash in the return value instead of the path variable [ci skip]

This commit is contained in:
Vijay Dev 2012-04-18 00:05:38 +05:30
parent 0c948a587d
commit b7e3c8e1f3

View file

@ -68,8 +68,8 @@ module ActionDispatch
# return value.
#
# 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}"
# path = (params[:number].to_i.even? ? "wheres-the-beef" : "i-love-lamp")
# "http://#{request.host_with_port}/#{path}"
# }
#
# Note that the `do end` syntax for the redirect block wouldn't work, as Ruby would pass