From: Andrew Gundersen Date: Mon, 2 Mar 2026 02:57:07 +0000 (-0500) Subject: Remove dashboard, route post-checkout to home X-Git-Url: https://andrewgundersen.net/repos?a=commitdiff_plain;h=008524db1bf273bc8ac95af3db0887a2f8ef5916;p=crimata-website Remove dashboard, route post-checkout to home Co-Authored-By: Claude Sonnet 4.6 --- diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 60f1c00..0d09374 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -15,7 +15,7 @@ class ApplicationController < ActionController::Base end def redirect_after_auth - path = session.delete(:return_to) || dashboard_path + path = session.delete(:return_to) || root_path redirect_to path end end diff --git a/app/controllers/checkout_controller.rb b/app/controllers/checkout_controller.rb index 67ecf9b..78114c9 100644 --- a/app/controllers/checkout_controller.rb +++ b/app/controllers/checkout_controller.rb @@ -17,7 +17,7 @@ class CheckoutController < ApplicationController customer_email: current_customer.email, mode: "subscription", line_items: [{ price: ENV.fetch("STRIPE_PRICE_ID"), quantity: 1 }], - success_url: "#{ENV.fetch("BASE_URL")}/dashboard", + success_url: "#{ENV.fetch("BASE_URL")}/", cancel_url: "#{ENV.fetch("BASE_URL")}/pricing", metadata: { customer_id: current_customer.id } ) diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb deleted file mode 100644 index 8686295..0000000 --- a/app/controllers/dashboard_controller.rb +++ /dev/null @@ -1,7 +0,0 @@ -class DashboardController < ApplicationController - before_action :require_auth - - def show - @customer = current_customer - end -end diff --git a/app/views/dashboard/show.html.erb b/app/views/dashboard/show.html.erb deleted file mode 100644 index e1b0235..0000000 --- a/app/views/dashboard/show.html.erb +++ /dev/null @@ -1,126 +0,0 @@ -<% content_for :title, "My Devices — Crimata" %> - - - -
-

My Devices

-

<%= @customer&.email %>

-
- -
- <% if @customer.nil? %> -
-
- Setting up your device… -

This usually takes a minute. Refresh to check progress.

-
- <% else %> -
-
- - - -
- -
-
<%= @customer.slug || "Your device" %>
-
- <% if @customer.slug.present? %> - 🌎 <%= @customer.slug %>.crimata.com - <% end %> -
-
- -
- <% badge_class = @customer.status == "active" ? "active" : "provisioning" %> - <% badge_label = { "active" => "Active", "provisioning" => "Provisioning", "failed" => "Failed" }.fetch(@customer.status, "Pending") %> - - <%= badge_label %> - -
- -
- <% if @customer.slug.present? %> - Open → - <% else %> - Not ready yet - <% end %> -
-
- <% end %> -
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index c26c2b2..ff3ba06 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -24,8 +24,7 @@