我有一个名为 的资源Foobar
,在我的页面上,我有一个包含选项、和出现/admin/foobars
的所有 foobar 的列表。我只想和出现。view
edit
delete
edit
delete
应用程序/管理员/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
我的问题是这仅显示Delete
选项 -Edit
仅在我删除第二行时显示。如何让它们都出现在同一个标题下?