You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks so much for the tutorial, it was great and worked with a few slight modifications.
I had to rename the token column to auth_token (so, rails g model user name auth_token email password_digest). This of course meant I had to change token to auth_token in a number of places: api_controller.rb, sessions_controller.rb, models/user.rb.
I was using a postgresql database and as @jaeming in #1 mentioned had to modify the migration: create the user table first and then, in a separate migration, add the index.
In sessions_controller.rb, I had to change user.regenerate_token to user.regenerate_auth_token.
And I had to modify the ApplicationController to look like this:
(I'm being as explicit as possible about my modifications because I suspect some of my students will find this tutorial and run into all the exact same bugs I did 😉 )
The text was updated successfully, but these errors were encountered:
Thanks so much for the tutorial, it was great and worked with a few slight modifications.
I had to rename the
token
column toauth_token
(so,rails g model user name auth_token email password_digest
). This of course meant I had to changetoken
toauth_token
in a number of places:api_controller.rb
,sessions_controller.rb
,models/user.rb
.I was using a postgresql database and as @jaeming in #1 mentioned had to modify the migration: create the user table first and then, in a separate migration, add the index.
In
sessions_controller.rb
, I had to changeuser.regenerate_token
touser.regenerate_auth_token
.And I had to modify the
ApplicationController
to look like this:(I'm being as explicit as possible about my modifications because I suspect some of my students will find this tutorial and run into all the exact same bugs I did 😉 )
The text was updated successfully, but these errors were encountered: