I have the following code...
I use the standard code generate by script/generate scaffold ....
def update
@ftpuser = Ftpuser.find(params[:id])
#
@ftpuser.Password = md5(@ftpuser.Password)
#
if @ftpuser.update_attributes(params[:ftpuser])
flash[:notice] = ''FTP-Benutzer erfolgreich
akualisiert.''
redirect_to :action => ''show'', :id => @ftpuser
else
render :action => ''edit''
end
.
.
end
def md5(passwort)
hash_class = Digest::MD5
@md5_passwort = hash_class.hexdigest(passwort)
end
My intention is to md5 the cleartext entered Password in a form -
but I have no access. The password is stored still in cleartext.
Any hints?
Thanx
--
Jochen
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---