This is the offending code

def create
    @story = Story.find(params[:story_id])
    @story.comments.create params[:comment]
    redirect_to story_path(@story)
end

When the above is called the log shows

Processing CommentsController#create (for 127.0.0.1 at 2010-07-31
10:04:38) [POST]
  Parameters: {"comment"=>{"body"=>"cat"}, "commit"=>"Comment",
"authenticity_token"=>"OK3kszAxcRhisEn/YGaG1sWsoX/C4MOxmj4qcUkX/Fs=",
"story_id"=>"5"}
   [4;35;1mUser Load (0.5ms) [0m    [0mSELECT * FROM "users" WHERE
("users"."id" = 2) LIMIT 1 [0m
   [4;36;1mStory Load (0.5ms) [0m    [0;1mSELECT * FROM "stories" WHERE
("stories"."id" = '5')  [0m
   [4;35;1mComment Create (0.3ms) [0m    [0mINSERT INTO "comments"
("created_at", "body", "updated_at", "story_id") VALUES('2010-07-31
10:04:39', 'cat', '2010-07-31 10:04:39', 5) [0m
Redirected to http://localhost:3000/stories/5
Completed in 209ms (DB: 1) | 302 Found
[http://localhost/stories/5/comments]

But the page doesn't refresh!!!!!!!!!!!!!!!!

I've read every entry in the forum on the forum and googled this for two
days , it's driving me mad. WHY DOESN'T IT WORK
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to