When trying out the newest version of Ember data it seems that relations should now be represented as
models: ["1", "2", "3"] instead of
model_ids: ["1", "2", "3"]. I’ve monkey-patched ActiveModelSerializer to fit with this new style.
When the records are saved back to the server, obviously I get the records without the
_ids which conflicts with what ActiveRecord is expecting. So I was ready to write a special deserializer for my Rails controllers.
However, I read this old AMS pull request and I saw that the
jj-abrams website documentation still uses the
model_ids style (maybe because they just haven’t been updated yet).
Does anyone have some insight into the direction of this API in the near-future? I’m wondering if Ember Data will be sticking with the current relationship serialization style, heading for something more like jsonapi.org with the nested
links styax, or going back to the current ASM style with
_ids. Also does anyone have this worked out with ASM, Rails, and the new Ember Data in a way they like?