![](/img/trans.png)
[英]Why do rails form helpers change the id/name I provide, and how can I make it stop?
[英]How can I prevent that Rails' form helpers to sanitize or transform my string for name
我想做那个
label_tag "{{myVariable}}", "My Variable"
具有以下输出
<label for="{{myVariable}}">
My Variable
</label>
表单助手正在变成_ _ myvariable _ _
试试这个label_tag nil, "My Variable", :for=> "{{myVariable}}"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.