Sha256: bc8095d2ef7143fa8b235b130605d86bfbfc4a825f299a2a1bdb0f656e6a20ed
Contents?: true
Size: 1.03 KB
Versions: 9
Compression:
Stored size: 1.03 KB
Contents
# Customizing the Show Screen Customizing the show screen is as simple as implementing the show block: ActiveAdmin.register Post do show do h3 post.title div do simple_format post.body end end end The show block is rendered within the context of the view and uses the Arbre HTML DSL. You can also render a partial at any point. ActiveAdmin.register Post do show do # renders app/views/admin/posts/_some_partial.html.erb render "some_partial" end end If you'd like to keep the default active_admin look, you can also use "attributes_table": ActiveAdmin.register Ad do show do |ad| attributes_table do row :title row :image do image_tag(ad.image.url) end end active_admin_comments end end You can customize the title of the object in the show screen. The default is the resouce name and the ID. You can customize as follows: show :title => :name do end
Version data entries
9 entries across 9 versions & 2 rubygems