mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
_recall should be set to a hash or not set
Then we can avoid nil checks
This commit is contained in:
parent
760aa3b52b
commit
348af15c33
2 changed files with 4 additions and 4 deletions
|
@ -656,7 +656,7 @@ module ActionDispatch
|
|||
password = options.delete :password
|
||||
end
|
||||
|
||||
recall = options.delete(:_recall)
|
||||
recall = options.delete(:_recall) { {} }
|
||||
|
||||
original_script_name = options.delete(:original_script_name)
|
||||
script_name = find_script_name options
|
||||
|
@ -668,7 +668,7 @@ module ActionDispatch
|
|||
path_options = options.dup
|
||||
RESERVED_OPTIONS.each { |ro| path_options.delete ro }
|
||||
|
||||
path, params = generate(path_options, recall || {})
|
||||
path, params = generate(path_options, recall)
|
||||
params.merge!(options[:params] || {})
|
||||
|
||||
ActionDispatch::Http::URL.url_for(options.merge!({
|
||||
|
|
|
@ -320,8 +320,8 @@ module ActionDispatch
|
|||
end
|
||||
|
||||
module RoutingTestHelpers
|
||||
def url_for(set, options, recall = nil)
|
||||
set.send(:url_for, options.merge(:only_path => true, :_recall => recall))
|
||||
def url_for(set, options, recall = {})
|
||||
set.url_for options.merge(:only_path => true, :_recall => recall)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue