After modifying the RJS template and noticing that the votes on each story were not being updated via Ajax, I refreshed the page itself and realized that votes were not being updated at all. In fact, Im pretty sure no votes are being stored after I click the 'shove it' button.
If I call the size method for a particular story's associated votes in the console, nothing new appears, even after clicking the 'shove it' button.
Everything looks good in the browser. My show.html.erb file is updated, as well as my votes_controller.rb file - so a vote should be stored.
Here's what the terminal reads after clicking the 'shove it' button:
________
FIgured it out. I did not correctly modify the config/routes.rb file. I, at first, added the the entire block of code in the book to the existing code in the file. I should have only modified the [map.resources :stories' line.
Bookmarks