Password bug

I have a form where you sign up for an account on my RoR site. I have
checks to make sure each text box has data in it. If I submit the form
with all empty boxes, the page will be refreshed with errors (userID
cannot be blank, email cannot be blank, etc.) Which is fine, but the
password field is filled with asterisks. I think that its the encrypted
‘blank’ password that shows up. How can I get it to be blank?

Thanks a lot

I have the same problem. I have a registration, checking with
validates_confirmation_of if the pwd and the pwd_confirmation are the
same. If not the pwd field is filled with stars!
I want it to be blank too!


common thing, and you’re right, it’s the password content.
two ways to solve that:

  1. in controller set password to nil
    (and make sure later, that this does not lead to empty passwords being

  2. create an additional attr_accessor :password_input
    (like password_confirmation)
    and make sure, that it’s stored in db

before_save would be a good place to do that

thx thorsten

i just found the exact same articel…i just didn’t get to set the
password in the controller to nil.
i set the :value => “” it works fine too.
How would i do that out of the controller?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs