我在Rails 6应用程序中的表单中使用了多个富文本字段,但是只有第一个字段存储在数据库中,其余字段根本没有显示在数据库上。
module.rbhas_rich_text :content
has_rich_text :references
has_rich_text :footnotes
_ form.html.erbf.rich_text_area:内容f.rich_text_area:参考f.rich_text_area:脚注controller.rbparams.require ...:content,:references,:footnotes ...
是的,这可以工作,但是请确保has_rich_text:attribute_name的名称与模型上的任何属性名称都不匹配。