rails/railties/lib
Edouard CHIN 4f7231da70 Fix the config_for to always return a NonSymbolAccessDeprecatedHash:
- If you have hashes inside array, the hashes were getting initialized
  as regular HWIA wereas we want them to be
  NonSymbolAccessDeprecatedHash in order to trigger a deprecation
  warning when keys are accessed with string.

  This patch fixes that by overwriting the `[]=` to to the same
  as what HWIA does (with the difference that we don't call
  `convert_key` to not trigger a deprecation when setting value).

  I also took the liberty to extract `hash.nested_under_indifferent_access`,
  into a separate method to allow subclasses to return whatever
  they want.
  Inheriting HWIA is not common, but I think it's useful for cases
  like this one where we want to preprocess reading and writing values
  in the hash (for deprecation purposes or other reasons).
2019-02-14 14:11:05 +01:00
..
minitest Railities typo fixes. 2019-02-01 16:42:40 +05:30
rails Fix the config_for to always return a NonSymbolAccessDeprecatedHash: 2019-02-14 14:11:05 +01:00
rails.rb Zeitwerk integration 2019-02-12 02:28:04 -08:00