Sha256: b51b792251d1898b04397854430fe9ebd99fed551a2a66dd3a4ba4bd2dcdf345
Contents?: true
Size: 869 Bytes
Versions: 4
Compression:
Stored size: 869 Bytes
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
Version data entries
4 entries across 4 versions & 2 rubygems
Version | Path |
---|---|
andrewroth_activeadmin-0.3.4 | docs/6-show-screens.md |
activeadmin-0.3.4 | docs/6-show-screens.md |
activeadmin-0.3.3 | docs/6-show-screens.md |
activeadmin-0.3.2 | docs/6-show-screens.md |