Associating Stories with Users
Hello - I am following the "BYO Ruby On Rails Web Apps" book and have an issue that someone might already have fixed.
I'm finishing up Chapter 8, where users have been added, with login/logout functionality. Suddenly the whole vote process is not working. I've verified that if I manually add a vote record, the score is incremented in the Show view. But clicking on the button does not create a record in Votes - that appears to be the problem.
Not sure what code I should forward to you, so please let me know.
[Edit: Resolved! Some of my migrations had not worked and I manually made changes to the database schema, which resulted in user_id being a required field on the votes table. The code itself is modified in the book in Chapter 9, page 297, so that the current user sets the user_id value on the vote.)