Dice the onion and garlic very small, possibly press the garlic. Knead half of it with a little salt, pepper and the minced meat and shape into balls.
Fry the meatballs in the hot oil and then remove them. Sweat the rest of the onions and garlic in the frying fat, sweat with the tomato paste and flour. Stir in the tomatoes and 150 ml of water and bring to the boil. Season with salt, pepper and thyme, simmer uncovered for 10 minutes.
In the meantime, cook the pasta in salted water according to the instructions on the packet. Stir the ricotta into the sauce. Drain the pasta, add to the sauce with the meatballs and mix in.