Skip to content

Commit

Permalink
Rails default key generator hash digest class is respected (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronjensen authored May 22, 2022
1 parent dd15190 commit 102e919
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/turbo/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 102e919

Please # to comment.