密码字段的自动完成关闭

我有一个用于编辑用户详细信息的表单.当我选择表单时,密码字段已经在其表单字段中显示了密码..所以当我只是更改其他内容然后尝试保存密码时也会进行更新..我怎样才能将密码字段留空..到目前为止,这是我尝试过的..但没有运气

I have a form for editing user details. When i select the form the password field already shows the password in its form field.. So when i just change the other things and then try to save the password also goes for updation.. How can i leave the password field blank.. This is so far what i have tried.. But no luck

<%= f.password_field :password, autocomplete: "off", class: "form-control", placeholder: "Leave as blank if you don't want to change password", value: "" %>



 1 条回答