Module: Devise::Models::MultiEmailAuthenticatable::AuthenticatableExtensions
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/devise/multi_email/models/authenticatable.rb
Instance Method Summary collapse
-
#email ⇒ Object
Gets the primary email address of the user.
-
#email=(new_email) ⇒ Object
Sets the default email address of the user.
Instance Method Details
#email ⇒ Object
Gets the primary email address of the user.
39 40 41 |
# File 'lib/devise/multi_email/models/authenticatable.rb', line 39 def email multi_email.primary_email_record.try(:email) end |
#email=(new_email) ⇒ Object
Sets the default email address of the user.
44 45 46 |
# 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 |