Closed strzibny closed 5 years ago
Yes.
https://hexdocs.pm/ja_serializer/0.14.0/JaSerializer.DSL.html#has_many/2
To use :author_id
just define author_id/2
in your module that returns the correct value.
To omit the data do not include the serializer option.
Perfect! Thanks a ton for your reply.
Hello all,
wondering if it's possible to specify the association ID in the links section.
E.g.
will use the original model as
:id
instead of the author ID :(.Is it possible to reference
:author_id
instead to link to the resource?Also secondly, I would like to omit the data attribute for the relationship. Is this possible?