Hey Daniel, this is great--thanks for posting this resource!
One quick q about your full code at the bottom: in SessionsController.rb and RegistrationsController.rb, "generate_jwt" should be called from the "user" object, not "current_user", correct?
I've been using the one you had earlier in your article and that works for me:
token = user.generate_jwt
Let me know if I misread something--I'm still new to Ruby / Rails. Thanks again!
Hey Daniel, this is great--thanks for posting this resource!
One quick q about your full code at the bottom: in SessionsController.rb and RegistrationsController.rb, "generate_jwt" should be called from the "user" object, not "current_user", correct?
I've been using the one you had earlier in your article and that works for me:
token = user.generate_jwt
Let me know if I misread something--I'm still new to Ruby / Rails. Thanks again!
Hi tiQu. You are correct, great catch! I've fixed it in the article now. Thanks for calling it out.