Heat the oil in a pan, sauté the garlic and onion. Add the tomatoes, sugar, bay leaf and herbs, season the sugo and simmer for approx. 20 mins. If the sugo is cooked for longer, add a little water every so often so that it doesn't become too thick.
Stir the ricotta with the egg yolks until smooth. Mix together the flour, parmesan and salt, add to the ricotta and mix to form an even dough.
Transfer the dough to a board liberally dusted with flour and cut into eight equal-sized pieces. Roll out each piece to a strip and cut into pieces approx. 2 cm long. Using a fork or a finger, prick/press out a small hollow (so that gnocchi hold more of the sauce when you serve them). Cook the gnocchi in batches in simmering salted water until they float to the surface. Remove with a slotted spoon, drain well, transfer to a bowl and keep warm.
Serve the sugo with the gnocchi.