diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-10-31 16:28:38 -0400 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-18 10:51:11 -0800 |
commit | 163b645472b863231558c93abcdc1454db00b287 (patch) | |
tree | 4d9b510bb81b9f00e9b076676550c00a79c73992 /actionpack/lib/action_dispatch | |
parent | 4589b2419b6c2f6d8b1ea0873999a4d0fa21bdb3 (diff) | |
download | rails-163b645472b863231558c93abcdc1454db00b287.tar.gz rails-163b645472b863231558c93abcdc1454db00b287.tar.bz2 rails-163b645472b863231558c93abcdc1454db00b287.zip |
arity check has been pushed up, so no need for proc wrapping
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/redirection.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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" |