From f8b8b604955ee07f45a8a5cd335d41e45c323cb6 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Mon, 6 Feb 2023 10:57:30 +0000 Subject: [PATCH] feat: show invalid page if link invalid --- app/controllers/auth/confirmations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/auth/confirmations_controller.rb b/app/controllers/auth/confirmations_controller.rb index d1e584b59..915faf843 100644 --- a/app/controllers/auth/confirmations_controller.rb +++ b/app/controllers/auth/confirmations_controller.rb @@ -11,7 +11,7 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController else respond_with_navigational(resource) { redirect_to after_confirmation_path_for(resource_name, resource) } end - elsif resource.errors.map(&:type).include?(:invalid) + elsif %i[blank invalid].any? { |error| resource.errors.map(&:type).include?(error) } render "devise/confirmations/invalid" elsif resource.errors.map(&:type).include?(:already_confirmed) redirect_to user_session_path