Sahih Muslim Book 4, Hadith Number 1145.

Chapter : When food is brought before man and he is inclined to take it, he should not say prayer before eating it and undesirability of prayer while feeling the call of nature.

Jabir reported: The Messenger of Allah (may peace be upon him) forbade eating of onions and leek. When we were overpowered by a desire (to eat) we ate them. Upon this he (the Holy Prophet) said: He who eats of this offensive plant must not approach our mosque, for the angels are harmed by the same things as men.