Skip to content
Permalink
Browse files
Disable Turbo for business form
This form can redirect to Stripe Checkout via a before_action in
ColdMessagesController that checks for an active business subscription.
Turbo (XHR) cannot redirect to an external URL (to my knowledge) due to
XSS protection.

> Fetch API cannot load due to access control checks.
  • Loading branch information
joemasilotti committed Jan 23, 2022
1 parent 2c78ba8 commit 888ca88
Showing 1 changed file with 2 additions and 1 deletion.
@@ -5,7 +5,8 @@
<%= t(".your_business_profile") %>
</h1>

<%= form_with model: business do |form| %>
<%# This form can redirect to Stripe Checkout via ColdMessagesController. Turbo cannot redirect to an external URL. %>
<%= form_with model: business, data: {turbo: false} do |form| %>
<div class="bg-white shadow px-4 py-5 lg:rounded-lg sm:p-6">
<div class="md:grid md:grid-cols-3 md:gap-6">
<div class="md:col-span-1">

0 comments on commit 888ca88

Please sign in to comment.