Skip to content

Commit

Permalink
Make AC::Parameters not inherited from Hash
Browse files Browse the repository at this point in the history
Following rails/rails#20868 changed how
ActionController::Parameters worked.

This change makes `dump_param_keys` match how the Rails side reads teh
hash keys.

Without this change the right keys don't make it to `Request::Utils` so
the test `test_dasherized_keys_as_xml` was failing because `sub-key`
wasn't being recognized as a key.
  • Loading branch information
eileencodes committed Aug 26, 2015
1 parent 7efe0eb commit ca0d9ce
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/webservice_test.rb
Expand Up @@ -13,7 +13,13 @@ def assign_parameters
def dump_params_keys(hash = params)
hash.keys.sort.inject("") do |s, k|
value = hash[k]
value = Hash === value ? "(#{dump_params_keys(value)})" : ""

if value.is_a?(Hash) || value.is_a?(ActionController::Parameters)
value = "(#{dump_params_keys(value)})"
else
value = ""
end

s << ", " unless s.empty?
s << "#{k}#{value}"
end
Expand Down

0 comments on commit ca0d9ce

Please sign in to comment.