From b7e3c8e1f387e4c0843371971317ca7972d8aeb5 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Wed, 18 Apr 2012 00:05:38 +0530 Subject: let's keep the slash in the return value instead of the path variable [ci skip] --- actionpack/lib/action_dispatch/routing/redirection.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/routing/redirection.rb b/actionpack/lib/action_dispatch/routing/redirection.rb index 17c1cfb379..f281738e6f 100644 --- a/actionpack/lib/action_dispatch/routing/redirection.rb +++ b/actionpack/lib/action_dispatch/routing/redirection.rb @@ -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 -- cgit v1.2.3