Undeprecate redirect_to with Hash argument and additional url_for parameters. Closes #7837.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6430 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
8a9496cb4e
commit
f596dda0bb
@ -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]
|
||||
|
@ -1037,7 +1037,7 @@ def redirect_to(options = {}, *parameters_for_method_reference) #:doc:
|
||||
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
|
||||
|
@ -22,6 +22,11 @@ def redirect_to_back
|
||||
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 @@ def test_redirect_to_back_with_no_referer
|
||||
get :redirect_to_back
|
||||
}
|
||||
end
|
||||
|
||||
def test_redirect_with_parameters
|
||||
get :redirect_with_parameters
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
module ModuleTest
|
||||
|
Loading…
Reference in New Issue
Block a user