Let $R$ be a graded ring such that $R_0$ is a field and let $\frak{m}$ be the maximal ideal generated by all the elements of positive degree. Then, is it true that $R$ is a UFD iff $R_{\frak{m}}$ is a UFD?
If not, then what would be an example of $R_{\frak{m}}$ being a UFD, but $R$ NOT being a UFD?
It'll be nice if the counterexample, if there exists one, is of a ring which is a quotient of a polynomial ring in finitely many variables, over algebraically closed field.
An idea is-
If we take any smooth surface $V \subset \mathbb{P}^3_{\mathbb{C}}$ of degree at least $2$ and containing a line, then $V$ is not factorial (since the line is a divisor which is not an integer multiple of the hyperplane section), but it is locally factorial because it is nonsingular.
But I'm wondering what would be an example of a ring that would give me such a $V$?