aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-08-11 15:55:14 -0700
committerSantiago Pastorino <santiago@wyeworks.com>2011-08-11 15:55:14 -0700
commitd1f1b04386cb50521128b3e44630f704bb738194 (patch)
tree3d23300d0335dea7cdde74277f47d902158623b6 /actionpack/lib/action_dispatch/routing
parente6fdfd0f6f80d47c97152826322ea8b01519b5c2 (diff)
parent61579b76616d06ccb8268411421c23fb612e5113 (diff)
downloadrails-d1f1b04386cb50521128b3e44630f704bb738194.tar.gz
rails-d1f1b04386cb50521128b3e44630f704bb738194.tar.bz2
rails-d1f1b04386cb50521128b3e44630f704bb738194.zip
Merge pull request #2497 from akaspick/url_for_fix
When calling url_for with a hash, additional (likely unwanted) values (such as :host) would be returned in the hash
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r--actionpack/lib/action_dispatch/routing/url_for.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/url_for.rb b/actionpack/lib/action_dispatch/routing/url_for.rb
index 480144fe9d..5d354b0fb8 100644
--- a/actionpack/lib/action_dispatch/routing/url_for.rb
+++ b/actionpack/lib/action_dispatch/routing/url_for.rb
@@ -140,7 +140,7 @@ module ActionDispatch
when String
options
when nil, Hash
- _routes.url_for((options || {}).reverse_merge!(url_options).symbolize_keys)
+ _routes.url_for((options.dup || {}).reverse_merge!(url_options).symbolize_keys)
else
polymorphic_url(options)
end