Skip to content

Instantly share code, notes, and snippets.

@kitwalker12
Created October 30, 2013 00:51
Show Gist options
  • Save kitwalker12/7225410 to your computer and use it in GitHub Desktop.
Save kitwalker12/7225410 to your computer and use it in GitHub Desktop.
Active Admin Customizations
ActiveAdmin.register Post do
index do
selectable_column
column :name do |post|
link_to post.name, admin_post_path(post)
end
column :author
#...
end
end
show do
attributes_table do
row :title
#...
end
panel :comments do
table_for post.comments do
column :body
column "Actions" do |comment|
text_node link_to "View", admin_comment_path(comment)
text_node "&nbsp".html_safe
text_node link_to "Edit", edit_admin_comment_path(comment)
text_node "&nbsp".html_safe
text_node link_to "Delete", delete_comment_admin_page_path(page, :comment => content_item.id), :method => 'delete'
end
#...
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment