1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport/test/core_ext
Edouard CHIN 48b6bacbc5 e4e1b62 broke to_param handling:
- 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
2018-07-12 13:04:27 -04:00
..
array Rails 6 requires Ruby 2.4.1+ 2018-02-17 15:34:57 -08:00
class [Active Support] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
digest [Active Support] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
hash Rails 6 requires Ruby 2.4.1+ 2018-02-17 15:34:57 -08:00
kernel [Active Support] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
module Replace assert ! with assert_not 2018-04-19 08:11:33 -04:00
object e4e1b62 broke to_param handling: 2018-07-12 13:04:27 -04:00
bigdecimal_test.rb Suppress warning: BigDecimal.new is deprecated 2017-12-15 01:19:57 +00:00
class_test.rb Change refute to assert_not 2018-01-25 23:32:58 -05:00
date_and_time_behavior.rb Move implementation of before? and after? to DateAndTime::Calculations 2018-03-31 18:20:46 +03:00
date_and_time_compatibility_test.rb [Active Support] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
date_ext_test.rb Move implementation of before? and after? to DateAndTime::Calculations 2018-03-31 18:20:46 +03:00
date_time_ext_test.rb Move implementation of before? and after? to DateAndTime::Calculations 2018-03-31 18:20:46 +03:00
duration_test.rb Add tests for duration multiplication and division 2018-06-25 13:48:35 +01:00
enumerable_test.rb Add Enumerable#index_with. 2018-05-21 17:44:54 +02:00
file_test.rb Replace assert ! with assert_not 2018-04-19 08:11:33 -04:00
hash_ext_test.rb Deprecate active_support/core_ext/hash/compact 2018-03-02 16:40:55 -08:00
integer_ext_test.rb Replace assert ! with assert_not 2018-04-19 08:11:33 -04:00
kernel_test.rb [Active Support] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
load_error_test.rb Fix #29632 - nil #path leads to NoMethodError in LoadError#is_missing? 2018-05-04 10:47:18 -04:00
marshal_test.rb [Active Support] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
module_test.rb Add separate test to ensure that delegate with :private option returns correct value 2018-02-28 10:29:12 +02:00
name_error_test.rb Replace assert ! with assert_not 2018-04-19 08:11:33 -04:00
numeric_ext_test.rb Deprecate "active_support/core_ext/numeric/inquiry" 2018-03-02 23:32:10 -08:00
range_ext_test.rb Replace assert ! with assert_not 2018-04-19 08:11:33 -04:00
regexp_ext_test.rb Remove test_match_p since Rails 6 requires Ruby 2.4.1 or newer 2018-05-07 04:19:24 +09:00
secure_random_test.rb [Active Support] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
string_ext_test.rb Replace assert ! with assert_not 2018-04-19 08:11:33 -04:00
time_ext_test.rb Move implementation of before? and after? to DateAndTime::Calculations 2018-03-31 18:20:46 +03:00
time_with_zone_test.rb Add before? and after? methods to date and time classes 2018-03-06 20:42:49 -08:00
uri_ext_test.rb URI.unescape handles mixed Unicode/escaped input 2018-03-07 12:58:02 +11:00