Fix billing buttons: bypass Turbo so external Stripe redirect navigates
button_to submits via Turbo (fetch), which can't follow a 302 to an external host (checkout.stripe.com), so Upgrade/Manage did nothing. data: { turbo: false } makes them full-page POSTs that follow the redirect. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Seto Elkahfi committed
Jun 24, 2026 at 10:03 UTC
8d4193e6c15020e830309275c100829f722672c2
1 file changed
+3
-3
app/views/billing/show.html.erb
+3
-3
index 6a73943..7b1c9b3 100644
--- a/app/views/billing/show.html.erb
+++ b/app/views/billing/show.html.erb
@@ -61,10 +61,10 @@
<!-- Actions -->
<div class="flex flex-wrap items-center gap-4">
<% if @entitled %>
- <%= button_to "Manage billing", billing_portal_path, method: :post, class: "btn-primary cursor-pointer" %>
+ <%= button_to "Manage billing", billing_portal_path, method: :post, data: { turbo: false }, class: "btn-primary cursor-pointer" %>
<% else %>
- <%= button_to "Upgrade to Pro", billing_checkout_path(plan: "pro"), method: :post, class: "btn-primary cursor-pointer" %>
- <%= button_to "Upgrade to Team", billing_checkout_path(plan: "team"), method: :post, class: "text-sm text-gray-400 hover:text-gray-200 transition-colors bg-transparent border-0 cursor-pointer" %>
+ <%= button_to "Upgrade to Pro", billing_checkout_path(plan: "pro"), method: :post, data: { turbo: false }, class: "btn-primary cursor-pointer" %>
+ <%= button_to "Upgrade to Team", billing_checkout_path(plan: "team"), method: :post, data: { turbo: false }, class: "text-sm text-gray-400 hover:text-gray-200 transition-colors bg-transparent border-0 cursor-pointer" %>
<% end %>
</div>
</div>