Complete Ring of Fractions of $\mathbb{Z}_{n}$ for any $n$ Recall first the following two definitions:


*

*Definition 1: Let $R$ be a commutative ring and $D$ a nonempty multiplicative sub-semigroup of $R$. The ring of fractions over $R$ with the set of denominators $D$ is a commutative ring with identity and is called the ring of fractions over $R$ with the set of denominators $D$. Notation: $D^{-1}R$

*Definition 2: If $D$ is the set of all non-zero elements of $R$ that are not zero divisors, then $D^{-1}R$ is referred to as the complete ring of fractions over $R$.


For the set $\mathbb{Z}_{n} = \{0,1,\dots, n-1\}$, the set of all nonzero elements of $\mathbb{Z}_{n}$ that are not zero divisors is the set $D = \{ m \in \mathbb{Z}_{n} \vert \gcd(m,n)=1\}$.  So, $\forall d \in D$, $m \in \mathbb{Z}_{n}$, it seems to me that, according to the definition given above, the complete ring of fractions of $\mathbb{Z}_{n}$ for any $n$ is 
$$ D^{-1}\mathbb{Z}_{n}=\left \{ \frac{m}{d}\, \;\middle|\; \gcd(d,n)=1\right \} $$
However, it just doesn't seem like it should be this easy. Am I wrong or not? Thanks for your time and patience! 

Note: This is NOT a duplicate of that other question, because I am specifically asking whether my particular method works, I don't even know what a class module is, and that question was closed for being off-topic because it had no context. 
 A: In $\mathbf{Z}_n$ and in general, in any finite ring $R$, an element $x \in R$ is either a zero divisor or a unit. So the complete ring of fractions of $R$ is $R$ when $|R| < \infty$. To see this, note that if $x$ is not a zero divisor then the map $y \mapsto xy$ is injective and hence surjective since $R$ is finite. So there is some $y$ such that $xy = 1$.
Edit: The universal property of localization says that if $S \subseteq R$ is a multiplicative set and $f : R \to R'$ is a homomorphism such that $f(s)$ is invertible for all $s \in S$ then $f$ factors through $S^{-1}R$: $$ R \to S^{-1}R \xrightarrow{\tilde f} R'.$$
If $S \subseteq R^\times$ is a multiplicative group of units then apply the universal property to the identity map. Since $\operatorname{id}(s) = s$ is invertible in $R$, the map $\operatorname{id} : R \to R$ factors through $S^{-1}R$ as $$R \to S^{-1}R \to R.$$ It follows that $R \cong S^{-1}R$. The homomorphisms are $\frac{x}{s} \mapsto s^{-1}x$ and $x \mapsto \frac{x}{1}$.
