gpt4 book ai didi

ruby-on-rails-3 - Rails Active Admin : How to display index page of one resource inside a show page of other resource?

转载 作者:行者123 更新时间:2023-12-04 04:41:40 26 4
gpt4 key购买 nike

例如,在我的Rails应用程序中,我对客户端和服务进行了建模,并建立了一对多关联。我已经将客户端注册为事件管理员中的资源,但是我不想为服务创建单独的索引页面。我希望能够在客户端的显示页面上查看属于客户端的服务,但是我希望服务列表看起来像在自己的索引页面上显示的那样:具有可排序列的表格等。如下图所示:

客户详细信息部分通过part呈现。

最佳答案

排序功能由称为Arbre componentIndexAsTable提供。注册资源ClientService {belongs_to:client}

关于ruby-on-rails-3 - Rails Active Admin : How to display index page of one resource inside a show page of other resource?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15814419/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com