My partial is being rendered twice: at the top of the page and at the place where it's supposed to. Apparently, this only happens when I have ActiveAdmin-specific code (table_for).
Any help is greatly appreciated. Below are some code snippets I'm using.
In my active admin file:
panel "Children - SubProcesses" do
text_node link_to "New", new_admin_sub_process_node_path(:parent_id => process_node.id)
div render :partial => "/admin/process_nodes/child_list", :locals => { :parent => process_node }
end
In _child_list.html.erb file
<%=
unless parent.children.empty?
table_for parent.children do
column :id
column :name
column "Actions" do |child_node|
text_node link_to "View", admin_process_node_path(child_node)
text_node " "
text_node link_to "Edit", edit_admin_process_node_path(child_node)
text_node " "
text_node link_to "Delete", admin_process_node_path(child_node), :method => :delete, :confirm => "Delete?"
end
end
end
%>