This issue is a (choose one):
Checklist before submitting:
Description
Choose one section below and delete the other:
Bug reports:
The documentation says that ResourceSerailizer should be able to include resources by doing something like this:
post = Post.find(1)
JSONAPI::ResourceSerializer.new(PostResource,
include: ['comments'],
).serialize_to_hash(PostResource.new(post, nil))
But when I do this I don't get an included section in the serialized output.
Additionally I don't find any tests in the test suite that demonstrate the documented way of doing it, but I find several tests that seem to achieve includes via much more verbose and laborious methods.
Am I missing something?
This issue is a (choose one):
Checklist before submitting:
ruby rails_5_master.rbdoesn't seem to work.Description
Choose one section below and delete the other:
Bug reports:
The documentation says that
ResourceSerailizershould be able toincluderesources by doing something like this:But when I do this I don't get an
includedsection in the serialized output.Additionally I don't find any tests in the test suite that demonstrate the documented way of doing it, but I find several tests that seem to achieve includes via much more verbose and laborious methods.
Am I missing something?