It is narrated from Sayyiduna Abu Ayyub al-Ansari (may Allah be pleased with him) that food with greens, containing onion or leek (a vegetable like garlic), was sent to the Messenger of Allah (peace and blessings be upon him); (then he (peace and blessings be upon him) sent it on to Abu Ayyub (may Allah be pleased with him)), and he did not see in it any trace of the Messenger of Allah (peace and blessings be upon him) (that is, any sign that he had eaten from it), so he refused to eat it. The Messenger of Allah (peace and blessings be upon him) said to him: "What prevented you from eating?" He said: O Messenger of Allah, I did not see your trace in it. The Messenger of Allah (peace and blessings be upon him) said: "I feel shy before the angels of Allah; otherwise it is not forbidden."
Hadith Referenceالمعجم الكبير للطبراني / باب الخاء / 4062