Module: Devise::Models::MultiEmailConfirmable::InstanceReplacementMethods
- Defined in:
- lib/devise/multi_email/models/confirmable.rb
Instance Method Summary collapse
-
#active_for_authentication? ⇒ Boolean
This need to be forwarded to the email that the user logged in with.
-
#inactive_message ⇒ Object
Shows email not confirmed instead of account inactive when the email that user used to login is not confirmed.
- #pending_reconfirmation? ⇒ Boolean
- #unconfirmed_email ⇒ Object
Instance Method Details
#active_for_authentication? ⇒ Boolean
This need to be forwarded to the email that the user logged in with
49 50 51 52 53 54 55 56 57 |
# File 'lib/devise/multi_email/models/confirmable.rb', line 49 def active_for_authentication? login_email = current_login_email_record if login_email && !login_email.primary? super && login_email.active_for_authentication? else super end end |
#inactive_message ⇒ Object
Shows email not confirmed instead of account inactive when the email that user used to login is not confirmed
60 61 62 63 64 65 66 67 68 |
# File 'lib/devise/multi_email/models/confirmable.rb', line 60 def login_email = current_login_email_record if login_email && !login_email.primary? && !login_email.confirmed? :unconfirmed else super end end |
#pending_reconfirmation? ⇒ Boolean
43 44 45 46 |
# File 'lib/devise/multi_email/models/confirmable.rb', line 43 def pending_reconfirmation? primary_email = primary_email_record primary_email && primary_email.pending_reconfirmation? end |
#unconfirmed_email ⇒ Object
39 40 41 |
# File 'lib/devise/multi_email/models/confirmable.rb', line 39 def unconfirmed_email primary_email_record.try(:unconfirmed_email) end |