Customizing the show page in ActiveAdmin

后端 未结 3 1406
不思量自难忘°
不思量自难忘° 2021-02-14 02:35

The default show page in ActiveAdmin is a table with one attribute per row. For my backend, this would be fine, except that I want to hide fields such as id, created_at, updated

3条回答
  •  故里飘歌
    2021-02-14 03:08

    I think you're looking for attributes_table:

    show do
      attributes_table :name, :content
    end
    

    See https://github.com/gregbell/active_admin/blob/master/lib/active_admin/views/pages/show.rb if you're curious.

    (I completely removed my prior answer because it was basically useless!)

提交回复
热议问题