which is correct – it pluralized the model by using “/myModels” instead of “myModel”.
However, the body of the POST is:
{myModel: {name: "myModelName"}}
and that’s where I need a modification. The server is expecting:
{myModels: {name: "myModelName"}}
What do I need to do pluralize the body of the POST message? I’ve looked at overriding “pathForType” in DS.RESTAdapter, but after tweaking with it, I am pretty certain that “pathForType” only modifies the URL (which is already correct), but not the body.
I feel like I need to override some other function, but I can’t seem to find which one. Could someone please advise? Thank you.
What do I need to do pluralize the body of the POST message? I’ve
looked at overriding “pathForType” in DS.RESTAdapter, but after
tweaking with it, I am pretty certain that “pathForType” only modifies
the URL (which is already correct), but not the body.
Correct.
I feel like I need to override some other function, but I can’t seem
to find which one. Could someone please advise? Thank you.
I think you may need to set an application-level serializer, which extends whichever serializer you’re currently using, and overrides the serializeIntoHash method.
You don’t say which serializer you’re using, but JSON is a good guess