Asterisk Out password in HTML (using Ruby on Rails)

I am new to web programming and even new to rubies on rails. What is the best way to get an asterisk or "hide" a new password entered by a user?

+2


source to share


3 answers


Well, it's not rails. This is html.

<input type="password" name="password" />

      



However, with rails, you can use a helper and automatically generate this html field in your view:

<%= password_field :password %>

      

+14


source


You are using an input field of type "password":



<input type="password" name="ThePassword" />

      

+5


source


<input type="password">

But if you intend this to be something that people will actually use, keep in mind that security is much more than that and can be quite complex.

0


source







All Articles