So zeigen Sie das Has_Many in den API -Serializer -Schienen an
class ProjectGroupSerializer < ActiveModel::Serializer
attributes :id, :name, :description, :projects
def projects
object.projects.map do |project|
::ProjectSerializer.new(project).attributes
end
end
end
Thoughtful Tarsier