diff options
author | eileencodes <eileencodes@gmail.com> | 2015-08-08 10:23:07 -0400 |
---|---|---|
committer | eileencodes <eileencodes@gmail.com> | 2015-08-08 10:29:34 -0400 |
commit | e7dd9069ca24d29f1c781d940c4b22083e111c86 (patch) | |
tree | cc77d256a6d618e15632e0452a4a5467924f3c2c /actionpack | |
parent | c8b82955836cfff2795464e8acc7592e3c192a51 (diff) | |
download | rails-e7dd9069ca24d29f1c781d940c4b22083e111c86.tar.gz rails-e7dd9069ca24d29f1c781d940c4b22083e111c86.tar.bz2 rails-e7dd9069ca24d29f1c781d940c4b22083e111c86.zip |
Rename `extra_keys` variables to `query_string_keys`
`extra_keys` is a confusing variable name because it's not clear what is
"extra". This renames it to `query_string_keys` so it's clear that the
"extra" is just the query string.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions/routing.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index 9dab72c5f0..39069f7378 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -44,12 +44,12 @@ module ActionController def assign_parameters(routes, controller_path, action, parameters = {}) parameters = parameters.symbolize_keys - generated_path, extra_keys = routes.generate_extras(parameters.merge(:controller => controller_path, :action => action)) + generated_path, query_string_keys = routes.generate_extras(parameters.merge(:controller => controller_path, :action => action)) non_path_parameters = {} path_parameters = {} parameters.each do |key, value| - if extra_keys.include?(key) || key == :action || key == :controller + if query_string_keys.include?(key) || key == :action || key == :controller non_path_parameters[key] = value else if value.is_a?(Array) diff --git a/actionpack/lib/action_dispatch/testing/assertions/routing.rb b/actionpack/lib/action_dispatch/testing/assertions/routing.rb index d0e3ea818e..54e24ed6bf 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/routing.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/routing.rb @@ -86,8 +86,8 @@ module ActionDispatch end # Load routes.rb if it hasn't been loaded. - generated_path, extra_keys = @routes.generate_extras(options, defaults) - found_extras = options.reject { |k, _| ! extra_keys.include? k } + generated_path, query_string_keys = @routes.generate_extras(options, defaults) + found_extras = options.reject { |k, _| ! query_string_keys.include? k } msg = message || sprintf("found extras <%s>, not <%s>", found_extras, extras) assert_equal(extras, found_extras, msg) |