Skip to content

Instantly share code, notes, and snippets.

@gregbell
Created September 20, 2011 18:53
Show Gist options
  • Save gregbell/1229963 to your computer and use it in GitHub Desktop.
Save gregbell/1229963 to your computer and use it in GitHub Desktop.
Active Admin - Show screen with default content
ActiveAdmin.register Product do
# Will show the default main content...
show do
# Do stuff before
default_main_content
# Do stuff after
end
# ... Or if you want to customize further
show do
attributes_table *default_attribute_table_rows
active_admin_comments
end
end
@kjell
Copy link

kjell commented Oct 10, 2011

Is there a good way to render the default_main_content table below Arbre content or a partial?

First I tried

    render 'show', :family => family
    default_main_content

This only shows default_main_content.

    default_main_content
    render 'show', :family => family

Does render the show partial, but after the main content.

@jtsagata
Copy link

  show do
    div do
      render 'show', :family => family
    end
    default_main_content
  end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment