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/lib/action_dispatch/routing/route_set.rb | |
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/lib/action_dispatch/routing/route_set.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 4 |
1 files changed, 2 insertions, 2 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!({ |