diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2017-08-03 10:01:35 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2017-08-03 10:01:35 -0500 |
commit | 624b6c210fee56fb8ef98a7a96f588d1bea8d124 (patch) | |
tree | 554e42faedf2e3045e1f92b596b4fe340909d7da /activestorage | |
parent | 939445153866b973eb52ec3a04f0885c083da0cf (diff) | |
download | rails-624b6c210fee56fb8ef98a7a96f588d1bea8d124.tar.gz rails-624b6c210fee56fb8ef98a7a96f588d1bea8d124.tar.bz2 rails-624b6c210fee56fb8ef98a7a96f588d1bea8d124.zip |
Can't initialize a message verifier without a key base
Diffstat (limited to 'activestorage')
-rw-r--r-- | activestorage/lib/active_storage/engine.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activestorage/lib/active_storage/engine.rb b/activestorage/lib/active_storage/engine.rb index 89e61163f5..1d345920fa 100644 --- a/activestorage/lib/active_storage/engine.rb +++ b/activestorage/lib/active_storage/engine.rb @@ -27,7 +27,9 @@ module ActiveStorage initializer "active_storage.verifier" do config.after_initialize do |app| - ActiveStorage.verifier = app.message_verifier("ActiveStorage") + if app.config.secret_key_base.present? + ActiveStorage.verifier = app.message_verifier("ActiveStorage") + end end end |