diff --git a/lib/alchemy/routing_constraints.rb b/lib/alchemy/routing_constraints.rb index 9de3fdf521..ffe6b9681b 100644 --- a/lib/alchemy/routing_constraints.rb +++ b/lib/alchemy/routing_constraints.rb @@ -27,7 +27,7 @@ def matches?(request) # because it could be a legacy route that needs to be redirected. # def handable_format? - @request.format.symbol.nil? || (@request.format.symbol == :html) + @request.format.symbol.nil? || @request.format.html? end # We don't want to handle the Rails info routes. diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index 36c6f1aac8..47aebbfca0 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -194,6 +194,14 @@ end end + describe "Turbo stream requests" do + it do + expect({ + get: "/contact/thanks.turbo_stream" + }).to be_routable + end + end + context "for admin interface" do context "default" do it "should route to admin dashboard" do