I had problems with my voting working correctly after I worked through the book up to page 238. It was not adding the votes when I clicked the shove it button.

I checked errors on the server command window and found that there was an end missing from the votes_controller.rb file. There must be three end listed there. Even copying the code archive showed only two. After I added the third end at the end of the file it worked. The code that worked is listed below. Hope this helps someone else having this voting problem.

Code Ruby:
class VotesController < ApplicationController
  def create
    @story = Story.find(params[:story_id])
    @story.votes.create
 
 respond_to do |format|
   format.html { redirect_to @story }
   format.js
    end
  end
end