Ray class field - Ring class field Let $K=Q(\sqrt{-d})$ be an imaginary quadratic field. Let $O_{K}$ be its maximal order and $O$
be any order of $K$. Let $m$ be the conductor. can the ray class field and ring class field be same?
 A: Let $\omega = \frac{-1+\sqrt{-d}}2$ when $-d = 1 \pmod 4$ and $\omega = \sqrt{-d}$ otherwise, such that $O_K = \Bbb Z[\omega]$.
It will be good to have a more concrete description of what are the possible lattices with endomorphism ring $\Bbb Z[m \omega]$.

If $I$ is an ideal of $O_K$ and $m$ is an integer, we say that an element $x \in I$ is prime to $m$ in $I$ if the multiplication by $x$ map $O_K \to I$ induces an isomorphism of $O_K$-modules $O_K/(m) \to I/mI$.
If we have such an $x$, then picking $J = \langle mI, x \rangle$, its endomorphism ring is exactly $\Bbb Z[m \omega]$.
Suppose $J \subset O_K$ is a lattice whose endomorphism ring is $\Bbb Z[m\omega]$. Then $I = J \otimes O_K$ is an ideal of $O_K$. Let $s : I \to I/J$ be the quotient map. Since $I = \langle J, \omega J \rangle$, $I/J = s(\omega J)$.
Given an integer $n$, $m \mid n \iff n\omega J \subset J \iff ns(\omega J) = 0 \iff n (I/J) =0$. Hence $m(I/J) = 0$, which shows that $mI \subset J$. From this we can also deduce that $s(\omega J)$ contains an element $s(\omega x)$ of order $m$ in $I/J$. Moreover, $J$ can't be contained in any nontrivial $dI$ ($I = \langle J, \omega J \rangle \subset dI$). This shows that $I/J \cong \Bbb Z/m \Bbb Z$ and is generated by $\omega x$.
Hence $J / mI$ is also cyclic of order $m$. We can pick a $y$ such that $J = \langle mI,y\rangle$. Then $I = \langle J, \omega y\rangle$, $y$ is prime to $m$ in $I$, and $J$ corresponds to the construction above.

Hence an $\Bbb Z[m \omega]$-ideal $J$ corresponds to an $O_K$-ideal $I$ together with an element $x \in I$ coprime to $m$ in $I$. Of course, only $x \pmod {mI}$ is important. 
If $u$ is a unit, then multiplication by $u$ is an isomorphism of $O_K/(m)$ (as an $O_K$-module), so that if $x$ is coprime to $m$ in $I$ then so is $ux$, and $u\langle mI, x \rangle = \langle mI, ux \rangle$, hence those two $\Bbb Z[m\omega]$-ideal classes are the same.
Now we can relate to some class field theory, except that those ideal class fields don't discerne as much : if $u \in (\Bbb Z/m\Bbb Z)^*$ and $x \in (I/mI)$ is prime to $m$ in $I$, then $\langle mI, x \rangle = \langle mI, ux \rangle$.
Let $I_K$ be the group of fractional ideals of $K$, $P_K^{(m)}$ the group generated by the principal ideals $(x)$ with $x \equiv 1 \pmod {(m)}$, and $Q_K^{(m)}$ the group generated by $P_K^{(m)}$ and the ideals $(x)$ with $x \in \Bbb Z$.
This means we have an abelian extension $K_m$ of $K$ whose Galois group is canonically isomorphic to the $\Bbb Z[m \omega]$-ideal class group, which corresponds to the quotient $I_K/Q_K^{(m)}$.
The class field $H_m$ of conductor $(m)$ is an extension of $K_m$, whose Galois group is canonically isomorphic to $Q_K^{(m)}/P_K^{(m)} \cong (\Bbb Z/m\Bbb Z)^*/\{\pm 1\}$. In fact, since $Q_K^{(m)}$ is the group generated by $P_K^{(m)}$ and the rational ideals, $H_m$ is the composite of $K_m$ with the cyclotomic field $\Bbb Q(\zeta_m)$, and so $H_m = K_m(\zeta_m) = K_m(\cos( \frac{2\pi}m))$
