mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
48b6bacbc5
- There was an issue inside controller tests where order params were not respected, the reason was because we were calling `Hash#to_query` which sorts the results lexicographically. 1e4e1b62 fixed that issue by not using `to_query` but instead a utility function provided by rack. - However with the fix came another issue where it's now no longer possible to do this ``` post :foo, params: { user: User.first } # Prior to the patch the controller will receive { "user" => "1" } # Whereas now you get { "user": "#<User: ...>" } ``` The fix in this PR is to modify `Hash#to_query` to sort only when it doesn't contain an array structure that looks something like "bar[]" Ref https://github.com/rails/rails/pull/33341#issuecomment-404039396 |
||
---|---|---|
.. | ||
acts_like_test.rb | ||
blank_test.rb | ||
deep_dup_test.rb | ||
duplicable_test.rb | ||
inclusion_test.rb | ||
instance_variables_test.rb | ||
json_cherry_pick_test.rb | ||
json_gem_encoding_test.rb | ||
to_param_test.rb | ||
to_query_test.rb | ||
try_test.rb |