Ibn Jurayj (may Allah have mercy on him) narrates from Ata' (may Allah have mercy on him) that a man said to Ibn Abbas (may Allah be pleased with them both): "I have vowed to slaughter my son," so Ibn Abbas (may Allah be pleased with them both) ordered him to slaughter a ram. He said: "There is for you in the Messenger of Allah (peace and blessings be upon him) an excellent example" [Surah al-Ahzab: 21].
This is how I found it in this narration.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأيمان / 20081