我使用的是ActiveAdmin。默认情况下,注释框将出现在显示页面的底部,但在我对其进行自定义后,该注释框区块将消失。
ActiveAdmin.register Book do
scope :all, :default => true
scope :publish
show do
attributes_table :name, :description, :owner, :company, :publish, :publisher
end
end
如何将评论框添加回显示页面?
发布于 2011-06-21 21:37:02
我得到了答案:-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
只需在显示块的末尾添加"active_admin_comments“即可。我在demo site的源代码里找到的
https://stackoverflow.com/questions/6420568
复制相似问题