Permalink
Browse files

Fixed :overwrite_param so it doesn't delete but reject elements from …

…@request.parameters #982 [raphinou@yahoo.com]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1061 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
dhh committed Apr 2, 2005
1 parent 00121b2 commit 5d42774b6253dabeb8238651422a113be1bfe083
Showing with 3 additions and 1 deletion.
  1. +2 −0 actionpack/CHANGELOG
  2. +1 −1 actionpack/lib/action_controller/url_rewriter.rb
View
@@ -1,5 +1,7 @@
*SVN*
+* Fixed :overwrite_param so it doesn't delete but reject elements from @request.parameters #982 [raphinou@yahoo.com]
+
* Added :method option to verify for ensuring that either GET, POST, etc is allowed #984 [Jamis Buck]
* Added options to set cc, bcc, subject, and body for UrlHelper#mail_to #966 [DeLynn]
@@ -38,7 +38,7 @@ def rewrite_path(options)
path, extras = Routing::Routes.generate(options, @request)
if extras[:overwrite_params]
- params_copy = @request.parameters.delete_if { |k,v| ["controller","action"].include? k }
+ params_copy = @request.parameters.reject { |k,v| ["controller","action"].include? k }
params_copy.update extras[:overwrite_params]
extras.delete(:overwrite_params)
extras.update(params_copy)

0 comments on commit 5d42774

Please sign in to comment.