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
When using fields[events]=name + include=establishment the key relationships disappear from the response hash.
Basic association is events belongs_to establishment
Issue is coming from here:
# JSONAPI::ResourceSerializer#supplying_relationship_fieldsdefsupplying_relationship_fields(resource_klass)@_supplying_relationship_fields.fetchresource_klassdorelationships=Set.new(resource_klass._relationships.keys.map(&:to_sym))cur=resource_klasswhilecur != JSONAPI::Resourceif@fields.has_key?(cur._type)# here... # It always empty the Set#relationships &= @fields[cur._type]breakendcur=cur.superclassend@_supplying_relationship_fields[resource_klass]=relationshipsendend
Commenting relationships &= @fields[cur._type] solves this issue. @DavidMikeSimon could you describe your mind here? I know it was a loooong time ago but your help might help to correctly fix this issue.
Activity