Both guys are at fault here.
Barea needs to be more mature. Just because you think you drew an offensive foul and didn't get the call doesn't merit you the right to give another player an unnecessary hit. It certainly wasn't a Flagrant 2, but it was absolutely unnecessary.
Ray should've walked away. There's no need to escalate the situation. You got the foul call, and you successfully got a guy to lose his cool. You won. I think it would've been appropriate to give him a T for going after Barea, but nothing else.
Also, Barea's antics as he left the court were pretty classless, albeit awesome.