Check your rjs code. Run debugger and insert <%debugger%> at the very top of the rjs file, if catches the debugger then you have an rjs code error. Install firebug and view the returned javascript. Since the rjs is rendered after the insert your insert would reflect in the log but bad rjs code would not run, sometimes there an error if you have a ruby-code problem, sometimes no error if its only java-script related.
You can also check your request format from within the controller with ... request.format ;) On Jul 31, 5:26 am, Neil Bye <[email protected]> wrote: > 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 tohttp://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 viahttp://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.

