The type of a polymorphic belongsTo is serialized properly.
@Cyril-sf I've added a hook to customize the polymorphic serialization in #1263. Should be in sometime today.
This PR will need updating once that's in.
@bradleypriest seems good, but we still need to fix the default value. I'll take care of updating my PR once yours is merged
Shouldn't this be moved into the hook in AMSerializer and just leave the hook in the JSONSerializer?
@Cyril-sf can you write some docs on the expected normalized form of polymorphic associations for the guide?
@wycats totally, it doesn't make sense to talk about polymorphic associations in the JSONSerializer.
I'll change that and write some docs.
@wycats Is anyone currently working on the ActiveModelSerializer?
@Cyril-sf It's pretty much done #1206
@Cyril-sf what's the status of this? The AMSerializer is waiting on this PR 😉
@wycats I'd already implemented this in AMS, this PR is just about whether to put it in the REST as well
@wycats The code is ready in @bradleypriest PR. I'll update today this PR to move that code in the REST serializer.
As for the documentation, updating the "Connecting to an HTTP Server" is ok for you?
@Cyril-sf Yes to both.
@wycats @bradleypriest seems to have pushed everything for both adapters.
I've started to write the documentation https://github.com/Cyril-sf/website/tree/polymorphic_associations.
The current difference between AMS and REST is that AMS capitalizes the polymorphic type as well.
The REST default is probably good enough for now though
@Cyril-sf I'm closing then.