diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-07-31 13:12:04 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-07-31 13:24:17 -0300 |
commit | 091a59301f65601b47c7022ac5028b7f6b569e00 (patch) | |
tree | 433eb5b853dbc17e736e8552de52792a227ad809 /actionpack | |
parent | fafff357cc775dab2cc46feaf43d311a7a042283 (diff) | |
download | rails-091a59301f65601b47c7022ac5028b7f6b569e00.tar.gz rails-091a59301f65601b47c7022ac5028b7f6b569e00.tar.bz2 rails-091a59301f65601b47c7022ac5028b7f6b569e00.zip |
Only concatenate path if it was given rather than converting blindly
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/http/url.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/url.rb b/actionpack/lib/action_dispatch/http/url.rb index ef07a101ad..55baba88e4 100644 --- a/actionpack/lib/action_dispatch/http/url.rb +++ b/actionpack/lib/action_dispatch/http/url.rb @@ -50,7 +50,7 @@ module ActionDispatch def path_for(options) path = options[:script_name].to_s.chomp("/") - path << options[:path].to_s + path << options[:path] if options.key?(:path) path = add_trailing_slash(path) if options[:trailing_slash] path = add_params(path, options[:params]) if options.key?(:params) path = add_anchor(path, options[:anchor]) if options.key?(:anchor) |