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.
我正在从数据库加载数据,这些数据以 ( form_for) 形式显示为无线电输入。无论如何支持Rails,如何总是检查组中的第一个无线电输入?
form_for
将此添加到第一个 radio_button:
:checked => true
尽管如果您从模型中使用它,我强烈建议您使用简单的形式