From 38d6f6d842ebcb6715aa02427a8875e9c9fd2b3b Mon Sep 17 00:00:00 2001 From: f Date: Tue, 4 Apr 2023 13:21:38 -0300 Subject: [PATCH] =?UTF-8?q?fix:=20mantener=20la=20notificaci=C3=B3n=20hast?= =?UTF-8?q?a=20que=20se=20confirme=20el=20correo=20#12950?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e80c279d..0628421f 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -9,6 +9,7 @@ class ApplicationController < ActionController::Base before_action :prepare_exception_notifier before_action :configure_permitted_parameters, if: :devise_controller? + before_action :notify_unconfirmed_email, unless: :devise_controller? around_action :set_locale rescue_from Pundit::NilPolicyError, with: :page_not_found @@ -27,6 +28,13 @@ class ApplicationController < ActionController::Base private + def notify_unconfirmed_email + return unless current_usuarie + return if current_usuarie.confirmed? + + flash[:notice] ||= I18n.t('devise.registrations.signed_up') + end + def uuid?(string) /[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}/ =~ string end