I am trying to post an ajax call as if it were the following form element:
<input type="text" name="data[BlogPost][title]" />
But I'm not having any luck here is my source:
$.ajax({
url: "/add/",
type: "POST",
data: ( /* what do I do here */),
success: function(msg){
alert(msg);
}
});
I've tried nested objects but that only generates a server response like: array 'data' => string '[object Object]' (length=15)
Which does nobody any good!
Any thoughts?