baby won't take medicine

Kira👶🏻
my daughter was prescribed ranitidine for her reflux & it works when she actually swallows it. But she's starting to realize how awful the taste is & immediatly spits it back out. I cant watch her be in pain anymore, do you guys have any tricks on getting your babies to take medicine?