[英]rails_admin table of has_many in the show?
我想在父对象的show视图中显示一个相关的has_many对象集作为表。
目前,has_many项目仅显示为以逗号分隔的列表。
如何将has_many项显示为表并指定要包含的列?
例如文章 has_many Autors 。
然后你应该添加Article类:
accepts_nested_attributes_for :autors, allow_destroy: true
attr_accessible :autors_attributes
更多信息https://github.com/sferik/rails_admin/wiki/Has-and-belongs-to-many-association
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.