From 163b645472b863231558c93abcdc1454db00b287 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 31 Oct 2011 16:28:38 -0400 Subject: arity check has been pushed up, so no need for proc wrapping --- actionpack/lib/action_dispatch/routing/redirection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 27dbf72519..d61320980d 100644 --- a/actionpack/lib/action_dispatch/routing/redirection.rb +++ b/actionpack/lib/action_dispatch/routing/redirection.rb @@ -47,7 +47,7 @@ module ActionDispatch elsif options.any? options_proc(options) elsif path.respond_to?(:call) - proc { |params, request| path.call(params, request) } + path elsif block if block.arity < 2 msg = "redirect blocks with arity of #{block.arity} are deprecated. Your block must take 2 parameters: the environment, and a request object" -- cgit v1.2.3