mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 13:21:41 +00:00
fix: mantener la notificación hasta que se confirme el correo #12950
This commit is contained in:
parent
3e6288fefe
commit
38d6f6d842
1 changed files with 8 additions and 0 deletions
|
@ -9,6 +9,7 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
before_action :prepare_exception_notifier
|
before_action :prepare_exception_notifier
|
||||||
before_action :configure_permitted_parameters, if: :devise_controller?
|
before_action :configure_permitted_parameters, if: :devise_controller?
|
||||||
|
before_action :notify_unconfirmed_email, unless: :devise_controller?
|
||||||
around_action :set_locale
|
around_action :set_locale
|
||||||
|
|
||||||
rescue_from Pundit::NilPolicyError, with: :page_not_found
|
rescue_from Pundit::NilPolicyError, with: :page_not_found
|
||||||
|
@ -27,6 +28,13 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
private
|
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)
|
def uuid?(string)
|
||||||
/[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}/ =~ string
|
/[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}/ =~ string
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue