add user_id to stories
Set up the associations between users and stories
Change the stories controller to associate new stories with the current user
Show the user that created the story in the show view
Add the comments table
Add the Comment model and the associations between comments, stories, and users
Setup the comments routes and a nested resource underneath the stories resource
Add a link to add a comment to the story show view
Add the comments controller and new view. Notice how we pass an array to form_for to match the nesting of the routes - [@story, @comment]
Show the comments on the story page
Slides
Merge remote-tracking branch 'teacher/master'