Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 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?

like image 228
Bank Avatar asked Jun 21 '11 05:06

Bank


1 Answers

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

like image 177
Bank Avatar answered Sep 30 '22 17:09

Bank