diff --git a/lib/hcaptcha/adapters/controller_methods.rb b/lib/hcaptcha/adapters/controller_methods.rb index 951d160f..98c9c5ae 100644 --- a/lib/hcaptcha/adapters/controller_methods.rb +++ b/lib/hcaptcha/adapters/controller_methods.rb @@ -67,7 +67,7 @@ def hcaptcha_error(model, attribute, message) end def hcaptcha_flash_supported? - request.respond_to?(:format) && request.format == :html && respond_to?(:flash) + request.respond_to?(:format) && %i[html turbo_stream].include?(request.format.to_sym) && respond_to?(:flash) end # Extracts response token from params. params['h-captcha-response'] should either be a