active_model_serializers-jsonapi_embedded_records_deserializer icon indicating copy to clipboard operation
active_model_serializers-jsonapi_embedded_records_deserializer copied to clipboard

Optionally embed

Open tappleby opened this issue 8 years ago • 1 comments

Is it possible to optionally embed only if the resource contains an attributes key, otherwise fallback to the standard approach?

tappleby avatar Apr 06 '16 16:04 tappleby

I haven't implemented this, since you might not have an attributes hash but a relationships hash and it would still be a valid embedded record in my opinion. Currently I don't have time to implement this but if you need this behaviour, feel free to send a pull request, I'd be happy to merge it.

spieker avatar Apr 06 '16 18:04 spieker