From 16c277d0a970e3196b818f0317a4ca819def4c80 Mon Sep 17 00:00:00 2001 From: kbe Date: Wed, 10 Sep 2025 15:11:33 +0200 Subject: [PATCH] chore: Remove links to non working themes --- app/controllers/orders_controller.rb | 5 +++++ app/views/components/_header.html.erb | 23 +++++++++-------------- config/routes.rb | 16 ++++++++-------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/app/controllers/orders_controller.rb b/app/controllers/orders_controller.rb index 06ebd07..35f4862 100644 --- a/app/controllers/orders_controller.rb +++ b/app/controllers/orders_controller.rb @@ -152,6 +152,11 @@ class OrdersController < ApplicationController return end + # For POST requests, increment the payment attempt counter + if request.post? + @order.increment_payment_attempt! + end + redirect_to checkout_order_path(@order) end diff --git a/app/views/components/_header.html.erb b/app/views/components/_header.html.erb index c5bd3c7..46399e6 100755 --- a/app/views/components/_header.html.erb +++ b/app/views/components/_header.html.erb @@ -11,18 +11,13 @@ @@ -88,18 +83,18 @@ <%= link_to events_path, class: "flex items-center px-3 py-2 rounded-lg text-base font-medium text-gray-700 hover:text-brand-primary hover:bg-gray-50" do %> - Événements + Événements & Afterworks <% end %> - <%= link_to events_path, + +
@@ -145,4 +140,4 @@
- \ No newline at end of file + diff --git a/config/routes.rb b/config/routes.rb index 04024c4..1c30bf5 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -13,16 +13,17 @@ Rails.application.routes.draw do root "pages#home" # === Devise === + # Routes for devise authentication Gem # Bind devise to user devise_for :users, path: "auth", path_names: { sign_in: "sign_in", # Route for user login sign_out: "sign_out", # Route for user logout - password: "reset-password", # Route for changing password - confirmation: "verification", # Route for account confirmation - unlock: "unblock", # Route for account unlock + password: "reset-password", # Route for changing password + confirmation: "verification", # Route for account confirmation + unlock: "unblock", # Route for account unlock # registration: "account", # Route for user account - sign_up: "signup" # Route for user registration + sign_up: "signup" # Route for user registration }, controllers: { sessions: "auth/sessions", # Custom controller for sessions @@ -32,8 +33,8 @@ Rails.application.routes.draw do } # === Onboarding === - get "onboarding", to: "onboarding#index", as: "onboarding" - post "onboarding", to: "onboarding#complete", as: "complete_onboarding" + get "onboarding", to: "onboarding#index", as: "onboarding" + post "onboarding", to: "onboarding#complete", as: "complete_onboarding" # === Pages === get "dashboard", to: "pages#dashboard", as: "dashboard" @@ -50,7 +51,7 @@ Rails.application.routes.draw do member do get :checkout get :invoice - post :retry_payment + match :retry_payment, via: [ :get, :post ] post :increment_payment_attempt end end @@ -87,7 +88,6 @@ Rails.application.routes.draw do end end - # API routes versioning namespace :api do namespace :v1 do