Adman65/active_model_serializers — comment on commit 9fa716e45214ab5add156fbc1957ff41a7544230
File: lib/active_model/serializer.rb line 296
By josevalim:

Just this feels a bit weird. I would put the type inside the serialized hash. I.e. instead of having this output:

{
:writer_type => 'PolymorphicUser',
:writer => {
:first_name => "Jose",
:last_name => "Valim"
}
}

I would have this:

{
:writer => {
:type => "PolymorphicUser",
:first_name => "Jose",
:last_name => "Valim"
}
}