(The word ring shall mean a commutative ring with an identity element in this question.)
Actually, there is a proof about this proposition, but I don't get it, even the first step.
Proposition: Let $A$ be a ring and $m \ne (1)$ an ideal of $A$ such that every $x\in A-m$ is a unit in $A$. Then $A$ is a local ring and $m$ its maximal ideal.
Proof on book: every ideal $\ne (1)$ consist of non-units, hence is contained in $m$. Hence $m$ is the only maximal ideal of $A$.
And I think I can use proposition that every non-unit of ring $A$ is contained in a maximal ideal to prove it, but I failed.
And I assumed I have proved that every ideal $\ne(1)$ consist of non-units. Then I can't figure the whole proof.
Could you show me more detail about this proof?