diff --git a/lib/turbo/engine.rb b/lib/turbo/engine.rb index 382623bd..9234f563 100644 --- a/lib/turbo/engine.rb +++ b/lib/turbo/engine.rb @@ -61,8 +61,10 @@ class Engine < Rails::Engine end initializer "turbo.signed_stream_verifier_key" do - Turbo.signed_stream_verifier_key = config.turbo.signed_stream_verifier_key || - Rails.application.key_generator.generate_key("turbo/signed_stream_verifier_key") + config.after_initialize do + Turbo.signed_stream_verifier_key = config.turbo.signed_stream_verifier_key || + Rails.application.key_generator.generate_key("turbo/signed_stream_verifier_key") + end end initializer "turbo.test_assertions" do