I have a resource called Foobar
, and on my /admin/foobars
page I have a list of all foobars with the options view
, edit
, and delete
appearing. I only want edit
and delete
to appear.
app/admin/foobars.rb
ActiveAdmin.register Foobar do
index do
# Here I have a bunch of columns for various fields in Foobar
# default_actions #=> Uncommenting this line would make view, edit, and delete appear.
actions :defaults => false do |foobar|
link_to 'Edit', edit_admin_foobar_path(foobar)
link_to 'Delete', admin_foobar_path(foobar), :method => :delete, :confirm => "Are you sure"
end
end
end
My problem is that this only shows the Delete
option - Edit
only shows up when I remove the second line. How do I get them to both show up under the same header?