module Hello::RailsActiveRecord::EmailCredential
Public Instance Methods
confirm_email!()
click to toggle source
# File lib/hello/rails_active_record/email_credential.rb, line 36 def confirm_email! update! verifying_token_digest: nil, verifying_token_digested_at: nil, confirmed_at: 1.second.ago end
email=(v)
click to toggle source
SETTERS
Calls superclass method
# File lib/hello/rails_active_record/email_credential.rb, line 18 def email=(v) super(v.to_s.downcase.delete(' ')) end
email_confirmed?()
click to toggle source
CUSTOM METHODS
# File lib/hello/rails_active_record/email_credential.rb, line 24 def email_confirmed? !!confirmed_at end
email_delivered?()
click to toggle source
# File lib/hello/rails_active_record/email_credential.rb, line 28 def email_delivered? !!email_delivered_at end
email_delivered_at()
click to toggle source
# File lib/hello/rails_active_record/email_credential.rb, line 32 def email_delivered_at verifying_token_digested_at end
Private Instance Methods
hello_validations()
click to toggle source
# File lib/hello/rails_active_record/email_credential.rb, line 42 def hello_validations return if errors.has_key?(:email) c = Hello.configuration validates_length_of :email, in: c.email_length validates_format_of :email, with: c.email_regex end