How to set up Ajax.Request, so that format.json block is executed?

Hi,

I’ve got format.js block in my code that returns some RJS.

I’m trying to do edit-in-place using RESTful approach and I’ve added
format.json block to the update action, but I can’t figure out how to
setup Ajax.Request, so this format.json block is actually executed.

I’ve tried adding contentType: “text/x-json” (or “application/json”)
to Ajax.Request options, but I’m getting 404 errors. I’m using Rails
2.1.2.

Cheers,
Szymek