I call $.ajax like this :
$.ajax({
type: 'PUT',
url: model.url(),
data: {task: {assigned_to: selected()}},
contentType: 'application/json'
})
selected()
returns an array
it sends request with this payload task%5Bassigned_to%5D%5B%5D=524eda6b421aa91f4e000003&task%5Bassigned_to%5D%5B%5D=524ee37c421aa91ca9000008
and it's wrong! Must send json but it's not json, my rails server can't handle that (Rails MultiJSON).
I tested on chrome and firefox (both on latest stable version).
Any help is really appreciated.
Edit
If I first JSON.stringify
data it works fine but that's not a good solution at all, and also $.ajax
works in other methods!