module Devise::Models::MultiEmailAuthenticatable::AuthenticatableExtensions

Public Instance Methods

email() click to toggle source

Gets the primary email address of the user.

# File lib/devise/multi_email/models/authenticatable.rb, line 39
def email
  multi_email.primary_email_record.try(:email)
end
email=(new_email) click to toggle source

Sets the default email address of the user.

# File lib/devise/multi_email/models/authenticatable.rb, line 44
def email=(new_email)
  multi_email.change_primary_email_to(new_email, allow_unconfirmed: true)
end