aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/url_rewriter.rb
diff options
context:
space:
mode:
authorNicholas Seckar <nseckar@gmail.com>2005-07-18 03:25:53 +0000
committerNicholas Seckar <nseckar@gmail.com>2005-07-18 03:25:53 +0000
commit2e175d35cd4fc4438f6d263c8fe205939cd4b95f (patch)
tree4ff8a37f72365bdb0ccbb972bf0130fe474e4adc /actionpack/lib/action_controller/url_rewriter.rb
parent741316dc7123e8cdd750642dff6f39257d0ddbec (diff)
downloadrails-2e175d35cd4fc4438f6d263c8fe205939cd4b95f.tar.gz
rails-2e175d35cd4fc4438f6d263c8fe205939cd4b95f.tar.bz2
rails-2e175d35cd4fc4438f6d263c8fe205939cd4b95f.zip
Fix last changeset to pass unittests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1858 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/url_rewriter.rb')
-rw-r--r--actionpack/lib/action_controller/url_rewriter.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/url_rewriter.rb b/actionpack/lib/action_controller/url_rewriter.rb
index 546bd13eb7..ecbc6851f4 100644
--- a/actionpack/lib/action_controller/url_rewriter.rb
+++ b/actionpack/lib/action_controller/url_rewriter.rb
@@ -31,13 +31,13 @@ module ActionController
rewritten_url
end
- def rewrite_path(original_options)
- options = original_options.symbolize_keys
- options.update(params.symbolize_keys) if (params = options[:params])
+ def rewrite_path(options)
+ options = options.symbolize_keys
+ options.update(options[:params].symbolize_keys) if options[:params]
RESERVED_OPTIONS.each {|k| options.delete k}
- path, extra_keys = Routing::Routes.generate(options, @request) # Warning: Routes will mutate and violate the options hash
+ path, extra_keys = Routing::Routes.generate(options.dup, @request) # Warning: Routes will mutate and violate the options hash
- path << build_query_string(original_options.symbolize_keys, extra_keys) unless extra_keys.empty?
+ path << build_query_string(options, extra_keys) unless extra_keys.empty?
path
end