Let $R$ be a non-zero commutative ring. Prove that the ideal $(x)$ of $R[x]$ is prime if and only if $R$ is an integral domain.
I'm working on the left-to-right direction right now. I know that $R[x]/(x)$ is an integral domain since $(x)$ is prime. So I want to fix $r\in R$ and use the evaluation map $e_r:R[x]\to R$ given by $f(x)\mapsto f(r)$, a surjective ring homomorphism, and apply the first isomorphism theorem. But I'm having trouble with the kernel of $e_r$.
First of all, is it even true that $\ker{(e_r)}=(x)$? If so, any hints you could drop would be great. Thanks!