我正在使用ActiveAdmin.默认情况下,评论框将显示在显示页面的底部,但在我自定义后,评论框块会消失.
ActiveAdmin.register Book do
scope :all, :default => true
scope :publish
show do
attributes_table :name, :description, :owner, :company, :publish, :publisher
end
end
Run Code Online (Sandbox Code Playgroud)
如何将评论框添加回节目页面?
Ban*_*ank 36
我得到了答案:-P
ActiveAdmin.register Book do
scope :all, :default => true
scope :publish
show do
attributes_table :name, :description, :owner, :company, :publish, :publisher
active_admin_comments # Add this line for comment block
end
end
Run Code Online (Sandbox Code Playgroud)
只需在show block的末尾添加"active_admin_comments"即可.我在演示网站的源代码上找到了它