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" %> - - - -
<%= @customer&.email %>
-This usually takes a minute. Refresh to check progress.
-