avoid testing only_path
we know that this call only wants the path returned, so lets call a method that returns the path.
This commit is contained in:
parent
caadbd85c1
commit
3300fdedc7
@ -695,12 +695,11 @@ def build_request_uri(action, parameters)
|
||||
unless @request.env["PATH_INFO"]
|
||||
options = @controller.respond_to?(:url_options) ? @controller.__send__(:url_options).merge(parameters) : parameters
|
||||
options.update(
|
||||
:only_path => true,
|
||||
:action => action,
|
||||
:relative_url_root => nil,
|
||||
:_recall => @request.path_parameters)
|
||||
|
||||
url, query_string = @routes.url_for(options).split("?", 2)
|
||||
url, query_string = @routes.path_for(options).split("?", 2)
|
||||
|
||||
@request.env["SCRIPT_NAME"] = @controller.config.relative_url_root
|
||||
@request.env["PATH_INFO"] = url
|
||||
|
@ -697,6 +697,10 @@ def find_script_name(options)
|
||||
options.delete(:script_name) { '' }
|
||||
end
|
||||
|
||||
def path_for(options, route_name = nil) # :nodoc:
|
||||
url_for(options, route_name, PATH)
|
||||
end
|
||||
|
||||
# The +options+ argument must be a hash whose keys are *symbols*.
|
||||
def url_for(options, route_name = nil, url_strategy = UNKNOWN)
|
||||
options = default_url_options.merge options
|
||||
|
Loading…
Reference in New Issue
Block a user