我正在使用ActiveAdmin。默认情况下,评论框将显示在显示页面的底部,但在我自定义后,评论框块会消失。
ActiveAdmin.register Book do
scope :all, :default => true
scope :publish
show do
attributes_table :name, :description, :owner, :company, :publish, :publisher
end
end
如何将评论框添加回节目页?
答案 0 :(得分:35)
我得到了答案:-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
只需在show block的末尾添加“active_admin_comments”即可。 我在源代码demo site
上找到了它