Module: Keymail::Authentication
- Defined in:
- app/models/keymail/authentication.rb
Class Method Summary collapse
Class Method Details
.request(email) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'app/models/keymail/authentication.rb', line 3 def self.request(email) raise ArgumentError, 'Email cannot be nil' if email.nil? token = Token.create!(email: email, expires_at: Keymail.config.expiration_time.since) AuthMailer.log_in(token).deliver token end |