_method in recent rails is brokenish
I was trying to pass in _method: 'put' as part of a json body and for some reason rails kept not realizing that I wanted to put.
Then I came across this article: http://stackoverflow.com/questions/1249282/set-method-to-put-in-rails-xml-requests
So... if you're using prototype your "put" methods look something like this:
-
new Ajax.Request(url, {
-
onSuccess: callback,
-
requestHeaders: {'X-Http-Method-Override': 'put'},
-
postBody: Object.toJSON(params),
-
contentType: "application/json"
-
});
