Depends completely on what size you are and what your trying to achieve. If your a big lad and wanna burn some off, take dinner 30min to hour before gym, so your not putting at energy/weight on after gym.
If your like me and just dnt put on any fat at all, you can do either or. I tend to do dinner after gym, i take energy drink (n.o.xplode or grenade preworkout) to give massive energy rush to build the muscle, then take dinner after to get a bit more into my body to repair it faster.
I aint a nutritionist though, but eres never a defined answer. All down to what ur gonna eat, what you doat gym, how long for, etc etc