You’re not receiving notifications from this thread.
Rails for Beginners Part 20: Forgot Your Password Discussion
Hi Chris, is there a particular reason the create a different controller for each route action?
I'm at a complete loss as to the difference between Current.user and @user, and when to use which one. Can anyone shed light on that for me? Thanks.
Ahhh. Took a while but I eventually realized that if you forgot your password you aren't logged in, there isn't a session cookie, and Current.user isn't of any use. Duh. :-/
Current.user is a SupportAttribute that helps us to avoid searching our user all the time, he only declares set_current_user( this method assigns the value of Current.user), but with SupportAttribute, this variable is converted into a global variable.
Thank you very much, Chris! I'm learning a lot. It doesn't feel like it's only an 8 min video. You can deliver a huge amount of useful information in a few minutes.
I'm getting a
No route matches [POST] "/password/reset" when I click on the reset password button. I can see that I do have the route.
1)password_reset GET /password/reset(.:format) password_resets#new
2)pasword_reset POST /pasword/reset(.:format) password_resets#create