diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-08-14 10:51:28 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-08-14 10:51:28 -0700 |
commit | 4751a8c51ff4b9766dcf8324347477095b7f940d (patch) | |
tree | d8d807e2ad3980f2b814de79124562949cb806f3 /actionview | |
parent | c8ede235374e948f2922250b2c322b6bc70a2449 (diff) | |
parent | 4d47220d7c4d07d23e4a1f01bdd6d86fa76237ca (diff) | |
download | rails-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.rb | 4 |
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 |