Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No documented method to render with relationship linkage but no included items #33

Open
quickdudley opened this issue May 6, 2018 · 2 comments

Comments

@quickdudley
Copy link

I am developing a rails application using jsonapi-rb 0.5.0 (jsonapi-serializable 0.3.0).

In the relevant serializer I have:

belongs_to :programme

For the index method in the controller: this gives the desired behavior. For the get method I need to include the programme relationship linkage, but without populating the included array in the jsonapi response.

I've only been able to discover these two options: none of which are currently acceptable:

  1. Using linkage always: true in the serializer: this is the only way to get the required response from my controller's get method, but this approach is unacceptable because it does the same thing in the index method

  2. Using the include hash parameter to the call to render in my controller. This approach is unacceptable because it populates the included array with a large, safely cacheable object.

@thomascchen
Copy link

I am running into the same issue.

@mzanini
Copy link

mzanini commented Jan 12, 2024

Same issue, this seems like a big miss. Any workaround you guys have found @thomascchen @quickdudley ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants