Heat the oven to 200°C (180° fan) , gas 6.
Brush a 20cm loose-based tin with half the oil.
Lay a sheet of pastry in the base, allowing a little to hang over the edges.
Brush lightly with oil and continue to layer the pastry, brushing with oil between the layers until most of the pastry has been used.
Reserve 4-5 sheets for the top.
Layer the potato, onion, ricotta, spinach and tomatoes, seasoning the layers with salt and pepper and sprinkling with crushed garlic and nutmeg.
Bring the pastry up over the filling, scrunching it on top.
Top with the remaining pastry sheets scrunching them up and drizzle with a little more oil.
Bake for 20 minutes, then reduce the oven temperature to 180°C (160° fan) gas 4.
Cook for a further 50-60 minutes, until the potatoes are tender.
Garnish with tarragon.