Class: JwtMailer
- Inherits:
-
ApplicationMailer
- Object
- ApplicationMailer
- JwtMailer
- Defined in:
- lib/generators/jwt_api/templates/mailers/jwt_mailer.rb
Instance Method Summary collapse
Instance Method Details
#reset_password(user_id, raw_token) ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'lib/generators/jwt_api/templates/mailers/jwt_mailer.rb', line 2 def reset_password(user_id, raw_token) @resource = User.find(user_id) # TODO: add url environement variable @token_link = "http://localhost:3000/api/v1/passwords/verify?token=#{raw_token}" @token = raw_token mail(to: @resource.email, subject: 'Reset password instructions', template_name: 'reset_password') end |