Sijo Kg wrote: > Hi > Suppose there is a User model So in the view you have > > <%= password_field 'user', 'password' %></p> > Now write in User model > > before_create :protect_password > def protect_password > self.password = Digest::MD5.hexdigest(self.password) > end > > There may be also other ways for doing this > > Sijo
Thank you so much for your help. I tried this one and can save the encrypted password. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

