aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2017-08-03 10:01:35 -0500
committerDavid Heinemeier Hansson <david@loudthinking.com>2017-08-03 10:01:35 -0500
commit624b6c210fee56fb8ef98a7a96f588d1bea8d124 (patch)
tree554e42faedf2e3045e1f92b596b4fe340909d7da /activestorage
parent939445153866b973eb52ec3a04f0885c083da0cf (diff)
downloadrails-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.rb4
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