From: "David A. Black" Date: 2010-02-05T09:11:29+09:00 Subject: Re: Newbie question, I have seen create! what does it mean Hi -- On Fri, 5 Feb 2010, Noppanit wrote: > Hi All, > > I have some newbie question, and I have been searching all over google > for a long time. Could some of you please explain me why do we have to > use ! instead of normal method > > like > @stock = Stock.create! params[:stock] > > what does the "!" actually mean? It's just a character in the method name, but it has a special conventional significance: http://dablog.rubypal.com/2007/8/15/bang-methods-or-danger-will-rubyist (The Rails source code, on the whole, does not follow the convention, which I've always thought was too bad.) David -- David A. Black Senior Developer, Cyrus Innovation Inc. THE COMPLEAT RUBYIST, Ruby training with Black/Brown/McAnally! http://www.compleatrubyist.com