Oil a 20cm round cake tin and if it is non-stick, line with greaseproof paper.
Boil the sweet potatoes in the stock for 10 minutes until soft, then drain and roughly mash with a fork.
In a non-stick frying pan, heat the olive oil. Add the garlic, rosemary, onion and peppers. When the onions are soft, add the mashed sweet potatoes and rocket. Remove from the heat.
Whisk together the eggs and milk, then add the potato mixture and pour into the cake tin. Bake in the oven for 15 minutes, then take it out and gently but firmly pat down the mixture to help make it solid. Put it back in the oven for another 15 minutes. It may well rise in the centre from time to time, but don’t worry – it will sink down when it cools.