diff options
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index cc31c4306f..d61b430f68 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -655,7 +655,7 @@ module ActionDispatch options = default_url_options.merge(options || {}) user, password = extract_authentication(options) - recall = options.delete(:_recall) { {} } + recall = options.delete(:_recall) original_script_name = options.delete(:original_script_name).presence script_name = options.delete(:script_name).presence || _generate_prefix(options) @@ -668,11 +668,8 @@ module ActionDispatch RESERVED_OPTIONS.each { |ro| path_options.delete ro } path_options = yield(path_options) if block_given? - path, params = generate(path_options, recall) - - if options.key? :params - params.merge! options[:params] - end + path, params = generate(path_options, recall || {}) + params.merge!(options[:params] || {}) ActionDispatch::Http::URL.url_for(options.merge!({ :path => path, |