As you want to serialize the array @items
, you can use the independent method as
r[:menu_items] = ActiveModel::ArraySerializer.new(@items, each_serializer: ItemMicroSerializer)
It will serialize the provided array of objects by serializing each object using ItemMicroSerializer.