开发者

Displaying a comment box on customized ActiveAdmin Show page

开发者 https://www.devze.com 2023-03-14 12:17 出处:网络
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.

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

精彩评论

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