Module: MinimalistAuthentication::EmailVerification
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/minimalist_authentication/email_verification.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #email_verified? ⇒ Boolean
- #needs_email_set? ⇒ Boolean
- #needs_email_verification? ⇒ Boolean
- #verify_email(token) ⇒ Object
Instance Method Details
#email_verified? ⇒ Boolean
31 32 33 |
# File 'lib/minimalist_authentication/email_verification.rb', line 31 def email_verified? email.present? && email_verified_at.present? end |
#needs_email_set? ⇒ Boolean
35 36 37 |
# File 'lib/minimalist_authentication/email_verification.rb', line 35 def needs_email_set? request_email_enabled? && email.blank? end |
#needs_email_verification? ⇒ Boolean
39 40 41 |
# File 'lib/minimalist_authentication/email_verification.rb', line 39 def needs_email_verification? email_verification_enabled? && email.present? && email_verified_at.blank? end |
#verify_email(token) ⇒ Object
43 44 45 |
# File 'lib/minimalist_authentication/email_verification.rb', line 43 def verify_email(token) touch(:email_verified_at) if token_owner?(:email_verification, token) end |