Closed unclaimedbaggage closed 12 years ago
(going out on a limb here, but I've been frustrated by the exact same thing) change your controller response to have some JSON rather than just "head: ok" (the rails default for contrller#update)
respond_to do |format|
format.json {render json: @task}
end
When expecting JSON, jQuery calls the error event if something that isn't JSON is returned, such as an empty body.
Rails vs. jQuery. FIGHT! http://forum.jquery.com/topic/jquery-calls-error-callback-on-successful-ajax-request-status-200
Ahh - of course. Many thanks, much appreciated.
Hi folks,
I have the following code in a backbone-rails view:
The problem is, the save is triggering error() every time, despite the rails side of thing saving successfully, the backbone side of things updating successfully, and no error being thrown in either the rails logs or the browser console. Any ideas what could be going on here?