diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-13 17:21:55 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-13 17:21:55 -0700 |
commit | 348af15c3353e771c662638baeff02f1ae91e5d9 (patch) | |
tree | f6671265cd8b4e0565910f4d87e34c35671d857a /actionpack | |
parent | 760aa3b52b28aff5653187bbe035a26cf574de3e (diff) | |
download | rails-348af15c3353e771c662638baeff02f1ae91e5d9.tar.gz rails-348af15c3353e771c662638baeff02f1ae91e5d9.tar.bz2 rails-348af15c3353e771c662638baeff02f1ae91e5d9.zip |
_recall should be set to a hash or not set
Then we can avoid nil checks
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 4 | ||||
-rw-r--r-- | actionpack/test/abstract_unit.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index bf48544ff5..fd163a47f4 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -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!({ diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index 03a4741f42..46de36317e 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -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 |