diff options
author | George Claghorn <george.claghorn@gmail.com> | 2017-08-04 22:32:34 -0400 |
---|---|---|
committer | George Claghorn <george.claghorn@gmail.com> | 2017-08-05 10:03:53 -0400 |
commit | 1ab1f8759607cae037522717594c02b6c7a7b168 (patch) | |
tree | 37874b7a5f52a3f8135f0e6e21a8f4b5afa6df48 | |
parent | 95ad242c8066e71c403d53ea634f347e357473b1 (diff) | |
download | rails-1ab1f8759607cae037522717594c02b6c7a7b168.tar.gz rails-1ab1f8759607cae037522717594c02b6c7a7b168.tar.bz2 rails-1ab1f8759607cae037522717594c02b6c7a7b168.zip |
Check for `app.secrets.secret_key_base`, not `app.config.secret_key_base`
By default, apps only have the former set.
-rw-r--r-- | activestorage/lib/active_storage/engine.rb | 2 | ||||
-rw-r--r-- | railties/test/application/configuration_test.rb | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/activestorage/lib/active_storage/engine.rb b/activestorage/lib/active_storage/engine.rb index 1d345920fa..da83d3908a 100644 --- a/activestorage/lib/active_storage/engine.rb +++ b/activestorage/lib/active_storage/engine.rb @@ -27,7 +27,7 @@ module ActiveStorage initializer "active_storage.verifier" do config.after_initialize do |app| - if app.config.secret_key_base.present? + if app.secrets.secret_key_base.present? ActiveStorage.verifier = app.message_verifier("ActiveStorage") end end diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 381bc2694f..c2f6a5a95c 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -453,10 +453,8 @@ module ApplicationTests secret_key_base: 123 YAML - app "development" - assert_raise(ArgumentError) do - app.key_generator + app "development" end end |