We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5063b8c + d7103e6 commit 782fc3cCopy full SHA for 782fc3c
1 file changed
lib/jsonapi/resource_serializer.rb
@@ -418,6 +418,7 @@ def to_many_linkage(source, relationship)
418
[obj.type.underscore.pluralize, obj.id]
419
end
420
else
421
+ assoc = assoc.unscope(:includes) if assoc.is_a?(ActiveRecord::Relation)
422
assoc.pluck(:type, :id).map do |type, id|
423
[type.underscore.pluralize, id]
424
0 commit comments