are both these sentence grammatically correct?

I brought the food he ate.
or
I brought the food that he ate.

can you also provide the rule or explanation ie. restrictive clause?