为 form_for 助手生成的表单添加(不覆盖类) [英] adding (not overwriting a class) for a form generated by the form_for helper
本文介绍了为 form_for 助手生成的表单添加(不覆盖类)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何向 rails 生成的表单添加额外的类?这与覆盖现有类相反,如下所述:
How do you add an additional class to a rails generated form? This is as opposed to overwriting the existing class as explained here:
使用 :class => "foo" 不起作用.
Using :class => "foo" does not work.
推荐答案
按照评论的建议,我通过手动添加原始类来做到这一点
Following the comment's advice I did this via manual addition of the original class
这篇关于为 form_for 助手生成的表单添加(不覆盖类)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文