Forum: Ruby on Rails How to set up Ajax.Request, so that format.json block is executed?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Szymon N. (Guest)
on 2009-01-19 16:21
(Received via mailing list)

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

This topic is locked and can not be replied to.