Ruby on rails 为什么rails的Simple_表单会生成downcase占位符?

Ruby on rails 为什么rails的Simple_表单会生成downcase占位符?,ruby-on-rails,simple-form,Ruby On Rails,Simple Form,与 生成的输出将是“电子邮件地址”作为占位符。 是否有可能抑制这种降级?我认为这是因为如果您还将任何非html属性传递给simpleformsinput,则必须在input\U html散列中包装额外的html属性 试试这个: <%= f.input :email, required: true, label:false, placeholder: "Email Adress", autofocus: true %> 这是正确的语法,我不能确认这种行为-简单表单不会对占位符做任


生成的输出将是“电子邮件地址”作为占位符。
是否有可能抑制这种降级?

我认为这是因为如果您还将任何非html属性传递给simpleforms
input
,则必须在
input\U html
散列中包装额外的html属性

试试这个:

<%= f.input :email, required: true, label:false, placeholder: "Email Adress", autofocus: true %>

这是正确的语法,我不能确认这种行为-简单表单不会对占位符做任何奇怪的事情(我使用的是v3.0.2)。这很奇怪。我也在使用3.0.2。第一个字符始终为大写,其余字符转换为小写。只有像“ÄÜÖ”这样的字符是不会更改的。对不起,我的错误-我实际上使用的是3.1.0.rc。这很有趣。插入
“Email\u0041dress”
时会发生什么情况?结果是相同的:Email-address即使输入了html,我也会得到相同的结果
<%= f.input :email, required: true, label: false, input_html: { placeholder: "Email Adress", autofocus: true }