module HasEmailAuthentication::Module::FindByEmail

Public Instance Methods

find_by_email(email) click to toggle source

Convenience method for finding a record by email. Attempts to downcase the provided email prior to searching the database for it.

@param email [String] the email to find the record by. @return [Object, nil]

# File lib/has_email_authentication/module.rb, line 44
def find_by_email(email)
  find_by(email: email.try(:downcase))
end