diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 2 | ||||
-rwxr-xr-x | actionpack/test/controller/redirect_test.rb | 10 |
3 files changed, 13 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index ed24262b07..880f5f6320 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Undeprecate redirect_to with Hash argument and additional url_for parameters. #7837 [subelsky] + * Cookie session store: ensure that new sessions doesn't reuse data from a deleted session in the same request. [Jeremy Kemper] * Deprecation: verification with :redirect_to => :named_route shouldn't be deprecated. #7525 [Justin French] diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 2f7919cc07..d6c7677d55 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -1037,7 +1037,7 @@ module ActionController #:nodoc: response.redirected_to = options else # TOOD: Deprecate me! - redirect_to(url_for(options, *parameters_for_method_reference)) + redirect_to(url_for(options)) response.redirected_to, response.redirected_to_method_params = options, parameters_for_method_reference end end diff --git a/actionpack/test/controller/redirect_test.rb b/actionpack/test/controller/redirect_test.rb index df037ec28d..c4d2ebe5cb 100755 --- a/actionpack/test/controller/redirect_test.rb +++ b/actionpack/test/controller/redirect_test.rb @@ -22,6 +22,11 @@ class RedirectController < ActionController::Base redirect_to :back end + def redirect_with_parameters + session[:params] = { :user => 'test'} + redirect_to session[:params], :acton => 'hello_world' + end + def rescue_errors(e) raise e end def rescue_action(e) raise end @@ -97,6 +102,11 @@ class RedirectTest < Test::Unit::TestCase get :redirect_to_back } end + + def test_redirect_with_parameters + get :redirect_with_parameters + end + end module ModuleTest |