Module: Devise::Models::MultiEmailAuthenticatable::AuthenticatableExtensions

Extended by:
ActiveSupport::Concern
Defined in:
lib/devise/multi_email/models/authenticatable.rb

Instance Method Summary collapse

Instance Method Details

#emailObject

Gets the primary email address of the user.



38
39
40
# File 'lib/devise/multi_email/models/authenticatable.rb', line 38

def email
  multi_email.primary_email.try(:email)
end

#email=(new_email) ⇒ Object

Sets the default email address of the user.



43
44
45
# File 'lib/devise/multi_email/models/authenticatable.rb', line 43

def email=(new_email)
  multi_email.change_primary_email_to(new_email)
end