簡體   English   中英

show_admin表中的has_many表?

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM