aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-08-14 10:51:28 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-08-14 10:51:28 -0700
commit4751a8c51ff4b9766dcf8324347477095b7f940d (patch)
treed8d807e2ad3980f2b814de79124562949cb806f3 /actionview
parentc8ede235374e948f2922250b2c322b6bc70a2449 (diff)
parent4d47220d7c4d07d23e4a1f01bdd6d86fa76237ca (diff)
downloadrails-4751a8c51ff4b9766dcf8324347477095b7f940d.tar.gz
rails-4751a8c51ff4b9766dcf8324347477095b7f940d.tar.bz2
rails-4751a8c51ff4b9766dcf8324347477095b7f940d.zip
Merge pull request #16504 from schneems/schneems/fix_url_for
Perf optimization for `url_for` called w/ Hash
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/routing_url_for.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/actionview/lib/action_view/routing_url_for.rb b/actionview/lib/action_view/routing_url_for.rb
index 881a123572..75febb8652 100644
--- a/actionview/lib/action_view/routing_url_for.rb
+++ b/actionview/lib/action_view/routing_url_for.rb
@@ -82,7 +82,9 @@ module ActionView
when nil
super({:only_path => true})
when Hash
- super({ :only_path => options[:host].nil? }.merge!(options.symbolize_keys))
+ options = options.symbolize_keys
+ options[:only_path] = options[:host].nil? unless options.key?(:only_path)
+ super(options)
when :back
_back_url
when Symbol