开发者

Displaying a comment box on customized ActiveAdmin Show page

I'm using ActiveAdmin. By default, the comment box will appear at the bottom of the show page, but after 开发者_C百科I customize it that comment box block disappears.

ActiveAdmin.register Book do
  scope :all, :default => true
  scope :publish

  show do
    attributes_table :name, :description, :owner, :company, :publish, :publisher
  end 
end

How can I add the comment box back to the show page?


I got Answer :-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

Just add "active_admin_comments" at the end of show block. I found it on source code of demo site

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜