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

has_many associations return an Array instead of a ResultSet #363

Open
risc12 opened this issue Jan 31, 2020 · 2 comments
Open

has_many associations return an Array instead of a ResultSet #363

risc12 opened this issue Jan 31, 2020 · 2 comments

Comments

@risc12
Copy link

risc12 commented Jan 31, 2020

I'd like to reopen #270. While the work-around mentioned works, I feel like that that is not the appropriate solution.

@gaorlov
Copy link
Collaborator

gaorlov commented Feb 4, 2020

That's fair. Have you had a chance to look at how you would fix it to return what you would expect?

@risc12
Copy link
Author

risc12 commented Feb 5, 2020

To make the association return what I need I reimplemented JsonApiClient::Associations::BaseAssociation.from_result_set to return what it is given, aka:

def from_result_set(result_set)
  result_set
end

But I am not sure what that method is supposed to be used for, so I don't feel very confident in that being the actual solution...

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

2 participants