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
@@ -61,10 +61,10 @@
61 <!-- Actions -->
62 <div class="flex flex-wrap items-center gap-4">
63 <% if @entitled %>
64 - <%= button_to "Manage billing", billing_portal_path, method: :post, class: "btn-primary cursor-pointer" %>
64 + <%= button_to "Manage billing", billing_portal_path, method: :post, data: { turbo: false }, class: "btn-primary cursor-pointer" %>
65 <% else %>
66 - <%= button_to "Upgrade to Pro", billing_checkout_path(plan: "pro"), method: :post, class: "btn-primary cursor-pointer" %>
67 - <%= 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" %>
66 + <%= button_to "Upgrade to Pro", billing_checkout_path(plan: "pro"), method: :post, data: { turbo: false }, class: "btn-primary cursor-pointer" %>
67 + <%= 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" %>
68 <% end %>
69 </div>
70 </div>