Ruby Authetication exercise: News stand...new stan

If there’s anyone frustrated with the News Stand project … Let me make you a new stan:

User.create step, there’s a bit a correction step you need to implement. I’ve reported the bug but until it’s patched here’s a work around:

In the step 9: When your adding all the columns in your db: migrate you need to add a password column:
t.string :password

otherwise the password_digest becomes the password field and then the bcrypt hashing of the password doesn’t work properly…

And most of all when you try the User.create bit in step 13 will give you an unknown attribute error because low and behold you do not have a password column in yo’ table but you do now because you like reading forums and found this very simple work around. Good for you :partying_face: Stan on.

2 Likes

Also after getting a little further in the exercise I kept on encountering the authenticity token error that I have encountered previously in the other intermediate Ruby course and looking for a work around by reading old posts on here and else where:

When you are setting up the user controller I forget which step it is but certainly by step 24 when you are filling it out with functionality goodness:

skip_before_action :verify_authenticity_token

put that in before any of the user and user redirects and that should clear up the authenticity token error

Though I have seen on StackOverflow and other such sites DO NOT do this in production code because that makes your authenticate less than robust. So learning to get the exercise done : yes :vulcan_salute: Real Life: NO. :-1: