------_ extPart_001_01C6E92B.DCD2A216 Content-Type: text/plain; charset so-8859-1" Content-Transfer-Encoding: quoted-printable Zouplaz wrote: > Hello, > > Under Ruby On Rails, I would like to replace > > mouvement = Mouvement.find(params[:id]) > mouvement.statut = :traite > mouvement.save! > > By > > Mouvement.update(params[:id], statut ='#{:traite}'") > > But this error occurs : undefined method `stringify_keys!' for "statut = traite":String > > > I don't understand the meaning of the error. Why does Ruby doesn't knows how to convert the symbol :traite to a string representation ? > > Even statut ='#{:traite.to_s}'" don't work > > Any help ? > > Thank you > I can't tell you exactly, but I can give you a hint. It is converting :traite to a string. But, you have a mistype somewhere, because you have an uneven number of double quotes. I'm guessing that when you pasted/wrote the code in your email, this was obscured. > Mouvement.update(params[:id], statut ='#{:traite}'") ^ ^^ You even have it again: > Even statut ='#{:traite.to_s}'" don't work ^ ^^ Hope that helps. -Justin ------_ extPart_001_01C6E92B.DCD2A216--