[英]How can I add comments to a custom page in Active Admin?
I'm using Active Admin in my Rails app and the default page for a resource has a comment field that seems very useful. 我在我的Rails应用程序中使用Active Admin,资源的默认页面有一个看起来非常有用的注释字段。 I created a custom show page for my resource and now the comment section is gone.
我为我的资源创建了一个自定义显示页面,现在评论部分已经消失。 How can I add it back?
我该怎么把它加回来?
ActiveAdmin.register Project do
show do
attributes_table :name, :description
active_admin_comments # Add this line for comment block
end
end
Use active_admin_comments inside your show block at the end. 最后在show block中使用active_admin_comments。 source ActiveAdmin Source
源ActiveAdmin源
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.