How to serialize the saving of the item in the store?


#1

Hello, I’m new at the emberjs discuss, I have a problem and I don’t know how to use serializer that way. So I have an example table called items, when i use item.save() ember is requesting POST request which is: {“items”:{“text”:“test”,“complete”:false}}, my back-end accepts only: {“text”:“test”,“complete”:false} How can i change the way of saving the record?

Greetings, Rafał


#2

http://emberjs.com/api/data/classes/DS.Serializer.html#method_serialize create your item serialize

https://guides.emberjs.com/v2.6.0/models/customizing-serializers/