我想在父对象的显示 View 中将一组相关的 has_many 对象显示为表格。
目前 has_many 项目仅显示为以逗号分隔的列表。
如何将 has_many 项目显示为表格并指定要包含的列?
最佳答案
例如 文章 has_many 车主 .
那么你应该只添加 文章 类(class):
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
关于ruby-on-rails - 显示中has_many 的rails_admin 表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16648581/