You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this might be related to #47. When including posts the relationship data for posts is included, but for posts.users the relationship data for posts is not included. posts,posts.users works
The line direct_children_includes = includes.reject { |key| key.include?('.') } in serializer.rb:267 seems to cause this. Changing it to direct_children_includes = includes.reject { |key| key.split('.')[0] } fixes this. I couldn't tell if this is intended or not, because there is a test that checks for it.
The text was updated successfully, but these errors were encountered:
Hmm, that's not intentional. In a pre-1.0 version of the spec, the spec said to only include leaf nodes for includes, but in the 1.0 spec they changed it to include all parent nodes as well. There was a PR that fixed it (#50) and I thought we have good test coverage for making sure that this works correctly. You're definitely using the latest version of this gem? Also, #47 that you referenced was actually caused by him overriding format_name and a bad interaction with strings/symbols—have you overridden format_name?
I think this might be related to #47. When including
posts
the relationship data for posts is included, but forposts.users
the relationship data for posts is not included.posts,posts.users
worksThe line
direct_children_includes = includes.reject { |key| key.include?('.') }
in serializer.rb:267 seems to cause this. Changing it todirect_children_includes = includes.reject { |key| key.split('.')[0] }
fixes this. I couldn't tell if this is intended or not, because there is a test that checks for it.The text was updated successfully, but these errors were encountered: