aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/calculations_test.rb
diff options
context:
space:
mode:
authorUfuk Kayserilioglu <ufuk@paralaus.com>2019-02-08 19:44:43 +0200
committerGannon McGibbon <gannon.mcgibbon@gmail.com>2019-02-11 14:12:10 -0500
commit325e917f5a5953e8125f4e6531ec28f0565954fd (patch)
tree38f795c8c3197a98be4b8ff0b5265ee784b64a17 /activerecord/test/cases/calculations_test.rb
parent1bbf08bb497a022f94c7309e0525071b1a65e272 (diff)
downloadrails-325e917f5a5953e8125f4e6531ec28f0565954fd.tar.gz
rails-325e917f5a5953e8125f4e6531ec28f0565954fd.tar.bz2
rails-325e917f5a5953e8125f4e6531ec28f0565954fd.zip
Allow deprecated non-symbol access to nested `config_for` hashes
A change to `Rails::Application.config_for` in https://github.com/rails/rails/pull/33815 and https://github.com/rails/rails/pull/33882 has altered the behaviour of the returned object in a breaking manner. Before that change, nested hashes returned from `config_for` could be accessed using non-symbol keys. After the change, all keys are recursively symbolized so non-symbol access fails to read the expected values. This is a breaking change for any app that might be relying on the nested hashes returned from `config_for` calls, and thus should be deprecated before being removed from the codebase. This commit introduces a temporary `NonSymbolAccessDeprecatedHash` class that recursively wraps any nested hashes inside the `OrderedOptions` object returned from `config_for` and issues a deprecation notice when a non-symbol based access is performed. This way, apps that are still relying on the ability to access these nested hashes using non-symbol keys will be able to observe the deprecation notices and have time to implement changes before non-symbol access is removed for good. A CHANGELOG entry is also added to note that non-symbol access to nested `config_for` hashes is deprecated.
Diffstat (limited to 'activerecord/test/cases/calculations_test.rb')
0 files changed, 0 insertions, 0 deletions