提交 ef686a60 编写于 作者: A Aaron Patterson

add both branches to the only_path conditional

上级 efb41c6a
......@@ -36,13 +36,13 @@ def url_for(options)
path = options[:script_name].to_s.chomp("/")
path << options[:path].to_s
add_trailing_slash(path) if options[:trailing_slash]
path = add_trailing_slash(path) if options[:trailing_slash]
result = path
unless options[:only_path]
result.prepend build_host_url(options)
end
result = if options[:only_path]
path
else
build_host_url(options).concat path
end
if options.key? :params
params = options[:params].is_a?(Hash) ?
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册