I think it may be too late, but just post here, as the question remains unanswered for future visitors.
You must wrap the JSON string in an object. For example, you can build a Json string, for example
var contentArray = [{"content":"content1", "title":"title1"}, {"content":"content2", "title":"title2"}];
var contentObj = {contents: contentArray};
Before submitting to Rails
jsonData = JSON.stringify(contentObj);
Access it in the Rails controller:
myContentArray = params[:contents]
source
share