mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Renamed _path_segments to _recall
This commit is contained in:
parent
422b3d70d5
commit
d89161e7cc
4 changed files with 5 additions and 5 deletions
|
@ -27,7 +27,7 @@ module ActionController
|
||||||
:host => request.host,
|
:host => request.host,
|
||||||
:port => request.optional_port,
|
:port => request.optional_port,
|
||||||
:protocol => request.protocol,
|
:protocol => request.protocol,
|
||||||
:_path_segments => request.symbolized_path_parameters
|
:_recall => request.symbolized_path_parameters
|
||||||
).freeze
|
).freeze
|
||||||
|
|
||||||
if _routes.equal?(env["action_dispatch.routes"])
|
if _routes.equal?(env["action_dispatch.routes"])
|
||||||
|
|
|
@ -581,7 +581,7 @@ module ActionController
|
||||||
:only_path => true,
|
:only_path => true,
|
||||||
:action => action,
|
:action => action,
|
||||||
:relative_url_root => nil,
|
:relative_url_root => nil,
|
||||||
:_path_segments => @request.symbolized_path_parameters)
|
:_recall => @request.symbolized_path_parameters)
|
||||||
|
|
||||||
url, query_string = @routes.url_for(options).split("?", 2)
|
url, query_string = @routes.url_for(options).split("?", 2)
|
||||||
|
|
||||||
|
|
|
@ -605,13 +605,13 @@ module ActionDispatch
|
||||||
options = default_url_options.merge(options || {})
|
options = default_url_options.merge(options || {})
|
||||||
|
|
||||||
user, password = extract_authentication(options)
|
user, password = extract_authentication(options)
|
||||||
path_segments = options.delete(:_path_segments)
|
recall = options.delete(:_recall)
|
||||||
script_name = options.delete(:script_name).presence || _generate_prefix(options)
|
script_name = options.delete(:script_name).presence || _generate_prefix(options)
|
||||||
|
|
||||||
path_options = options.except(*RESERVED_OPTIONS)
|
path_options = options.except(*RESERVED_OPTIONS)
|
||||||
path_options = yield(path_options) if block_given?
|
path_options = yield(path_options) if block_given?
|
||||||
|
|
||||||
path, params = generate(path_options, path_segments || {})
|
path, params = generate(path_options, recall || {})
|
||||||
params.merge!(options[:params] || {})
|
params.merge!(options[:params] || {})
|
||||||
|
|
||||||
ActionDispatch::Http::URL.url_for(options.merge!({
|
ActionDispatch::Http::URL.url_for(options.merge!({
|
||||||
|
|
|
@ -356,6 +356,6 @@ end
|
||||||
|
|
||||||
module RoutingTestHelpers
|
module RoutingTestHelpers
|
||||||
def url_for(set, options, recall = nil)
|
def url_for(set, options, recall = nil)
|
||||||
set.send(:url_for, options.merge(:only_path => true, :_path_segments => recall))
|
set.send(:url_for, options.merge(:only_path => true, :_recall => recall))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue