Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在用
<%= f.input :firstName %>
其中 firstName 是用户模型中的一个字段
但是,输入框旁边的文本是firstName,有没有办法将输入框旁边的文本改为first_name?
试试 `<%= f.input :firstName, "first_name" %>
如果您使用的是 simple_form gem,那么试试这个
<%= f.input :firstName, label: 'first_name' %>