Soh Dubom wrote: > In the before_create I could do that > > def before_create > self.password = User.hash_password(@password) > end > > but that will work only for web form submit!
I think you're wrong. password= is probably just an accessor, setting @password. So, u.password = '123' sets @password to '123. u.password returns the value of @password. password= _could_ be anything, though. It depends on the implementation. -- 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 -~----------~----~----~----~------~----~------~--~---

