我正在使用simple_form_for
生成表单。Rails - 如何在simple_form_for表单中添加自己的标签?
这是一种标准的方式如何呈现输入:
<%= f.input :password, input_html: { class: 'textinput' }, :required => true, :autofocus => true, :placeholder => 'this is heavy' %>
论simple_form
官方Github的页面显示这种方式来做到这一点:
<%= f.input :password, label: 'Password (at least 8 characters)', input_html: { class: 'textinput' }, :required => true, :autofocus => true, :placeholder => 'this is heavy' %>
但是,当我将它设置这样,标签仍然说密码,而不是密码(至少8个字符)。
我在做什么错?