开发者

Rails: how can I force no value for a form_for text field for a model that has that field populated?

I have this form:

=form_for @current_user, :url => update_password_path do |f|
    %label{:for => ""} * New Password
    =f.password_field :password, :value => ""

But when the开发者_开发知识库 current user has a password, this field is populated on the page despite the :value => ""

How can I force this field blank on the page and still use form_for?


password_field_tag "user[password]", ""
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜