From 0541a0d5481043a9c78371446389794944daf3f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 21 Apr 2017 16:40:03 -0400 Subject: Add note about #26929 in the upgrade guide This is a small breaking change that we chose to make in 5.1 since the fix can be done with a search and replace tool. --- guides/source/upgrading_ruby_on_rails.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'guides/source/upgrading_ruby_on_rails.md') diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md index 3afc0e5309..ebfdc78dfc 100644 --- a/guides/source/upgrading_ruby_on_rails.md +++ b/guides/source/upgrading_ruby_on_rails.md @@ -84,6 +84,23 @@ Also, if you have pretty old YAML documents containing dumps of such objects, you may need to load and dump them again to make sure that they reference the right constant and that loading them won't break in the future. +### `config.secrets` now load with all keys as symbols + +If you application stores nested configuration in `secrets.yml` now all keys are being +laded as symbols so access using strings should be changed. + +From: + +```ruby +Rails.appplication.config.secrets[:smtp_settings]["address"] +``` + +To: + +```ruby +Rails.application.config.secrets[:smtp_settings][:address] +``` + Upgrading from Rails 4.2 to Rails 5.0 ------------------------------------- -- cgit v1.2.3 From 93897d79edfb5b546bf544a27b92f66882ca1b88 Mon Sep 17 00:00:00 2001 From: Shanthi Pendleton Date: Sun, 23 Apr 2017 13:28:38 +0100 Subject: [ci_skip] Fix typo in Rails 5.1 upgrade notes --- guides/source/upgrading_ruby_on_rails.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/upgrading_ruby_on_rails.md') diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md index ebfdc78dfc..3284a6c77e 100644 --- a/guides/source/upgrading_ruby_on_rails.md +++ b/guides/source/upgrading_ruby_on_rails.md @@ -87,7 +87,7 @@ the right constant and that loading them won't break in the future. ### `config.secrets` now load with all keys as symbols If you application stores nested configuration in `secrets.yml` now all keys are being -laded as symbols so access using strings should be changed. +loaded as symbols so access using strings should be changed. From: -- cgit v1.2.3 From c9d7eeb9dbca7b1cae877d1a02832861dce6691e Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sun, 23 Apr 2017 12:24:05 -0400 Subject: Small grammar fixes [ci skip] --- guides/source/upgrading_ruby_on_rails.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'guides/source/upgrading_ruby_on_rails.md') diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md index 3284a6c77e..ff747a95a0 100644 --- a/guides/source/upgrading_ruby_on_rails.md +++ b/guides/source/upgrading_ruby_on_rails.md @@ -73,21 +73,20 @@ For more information on changes made to Rails 5.1 please see the [release notes] ### Top-level `HashWithIndifferentAccess` is soft-deprecated If your application uses the the top-level `HashWithIndifferentAccess` class, you -should slowly move your code to use the `ActiveSupport::HashWithIndifferentAccess` -one. +should slowly move your code to instead use `ActiveSupport::HashWithIndifferentAccess`. It is only soft-deprecated, which means that your code will not break at the -moment and no deprecation warning will be displayed but this constant will be +moment and no deprecation warning will be displayed, but this constant will be removed in the future. Also, if you have pretty old YAML documents containing dumps of such objects, you may need to load and dump them again to make sure that they reference -the right constant and that loading them won't break in the future. +the right constant, and that loading them won't break in the future. -### `config.secrets` now load with all keys as symbols +### `config.secrets` now loaded with all keys as symbols -If you application stores nested configuration in `secrets.yml` now all keys are being -loaded as symbols so access using strings should be changed. +If your application stores nested configuration in `config/secrets.yml`, all keys +are now loaded as symbols, so access using strings should be changed. From: -- cgit v1.2.3