Module: Devise::Models::MultiEmailConfirmable::ConfirmableExtensions
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/devise/multi_email/models/confirmable.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#active_for_authentication? ⇒ Boolean
This need to be forwarded to the email that the user logged in with.
-
#email=(new_email) ⇒ Object
In case email updates are being postponed, don’t change anything when the postpone feature tries to switch things back.
-
#inactive_message ⇒ Object
Shows email not confirmed instead of account inactive when the email that user used to login is not confirmed.
Instance Method Details
#active_for_authentication? ⇒ Boolean
This need to be forwarded to the email that the user logged in with
55 56 57 58 59 60 61 62 63 |
# 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) ⇒ Object
In case email updates are being postponed, don’t change anything when the postpone feature tries to switch things back
50 51 52 |
# File 'lib/devise/multi_email/models/confirmable.rb', line 50 def email=(new_email) multi_email.change_primary_email_to(new_email, allow_unconfirmed: unconfirmed_access_possible?) end |
#inactive_message ⇒ Object
Shows email not confirmed instead of account inactive when the email that user used to login is not confirmed
66 67 68 69 70 71 72 73 74 |
# File 'lib/devise/multi_email/models/confirmable.rb', line 66 def login_email = multi_email.login_email_record if login_email && !login_email.primary? && !login_email.confirmed? :unconfirmed else super end end |