module Devise::Models::MultiEmailConfirmable::ConfirmableExtensions
Public Instance Methods
active_for_authentication?()
click to toggle source
This need to be forwarded to the email that the user logged in with
Calls superclass method
# File lib/devise/multi_email/models/confirmable.rb, line 55 def active_for_authentication? login_email = multi_email.login_email_record if login_email && !login_email.primary? super && login_email.active_for_authentication? else super end end
email=(new_email)
click to toggle source
In case email updates are being postponed, don't change anything when the postpone feature tries to switch things back
# File lib/devise/multi_email/models/confirmable.rb, line 50 def email=(new_email) multi_email.change_primary_email_to(new_email, allow_unconfirmed: Devise.allow_unconfirmed_access_for > 0.days) end
inactive_message()
click to toggle source
Shows email not confirmed instead of account inactive when the email that user used to login is not confirmed
Calls superclass method
# File lib/devise/multi_email/models/confirmable.rb, line 66 def inactive_message login_email = multi_email.login_email_record if login_email && !login_email.primary? && !login_email.confirmed? :unconfirmed else super end end
Protected Instance Methods
generate_confirmation_token()
click to toggle source
Email should handle the confirmation token.
# File lib/devise/multi_email/models/confirmable.rb, line 84 def generate_confirmation_token end
postpone_email_change?()
click to toggle source
Overrides Devise::Models::Confirmable#postpone_email_change?
# File lib/devise/multi_email/models/confirmable.rb, line 79 def postpone_email_change? false end
send_on_create_confirmation_instructions()
click to toggle source
Email will send confirmation instructions.
# File lib/devise/multi_email/models/confirmable.rb, line 92 def send_on_create_confirmation_instructions end
send_reconfirmation_instructions()
click to toggle source
Email will send reconfirmation instructions.
# File lib/devise/multi_email/models/confirmable.rb, line 88 def send_reconfirmation_instructions end