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

Instance Method Details

#active_for_authentication?Boolean

This need to be forwarded to the email that the user logged in with

Returns:

  • (Boolean)


49
50
51
52
53
54
55
56
57
# File 'lib/devise/multi_email/models/confirmable.rb', line 49

def active_for_authentication?
   = 

  if  && !.primary?
    super && .active_for_authentication?
  else
    super
  end
end

#inactive_messageObject

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 inactive_message
   = 

  if  && !.primary? && !.confirmed?
    :unconfirmed
  else
    super
  end
end