Created
October 30, 2013 00:51
-
-
Save kitwalker12/7225410 to your computer and use it in GitHub Desktop.
Active Admin Customizations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 " ".html_safe | |
text_node link_to "Edit", edit_admin_comment_path(comment) | |
text_node " ".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