I'm a newby at web programming, and even newer to ruby on rails. What is the best way of asterisking out or "hiding" a new password entered by a user?
+5
A:
You use an input field with the type "password":
<input type="password" name="ThePassword" />
Guffa
2009-10-20 09:15:44
+11
A:
Well it's not rails. It's html.
<input type="password" name="password" />
However with rails, you can use an helper and generate that html field automatically in your view :
<%= password_field :password %>
Damien MATHIEU
2009-10-20 09:16:22
A:
<input type="password">
But if you intend for this to be something people will actually use, keep in mind that security goes a lot further than that and can actually be quite tricky.
Chuck
2009-10-20 09:17:25