Skip to content

Enable and disable CRUD actions

hernanvicente edited this page Dec 31, 2011 · 2 revisions

To enable or disable defaults CRUD actions from your resource, just add in app/admin/posts.rb::

Disable the new and destroy action

ActiveAdmin.register Post do
  # Disable the new and destroy actions, but you can still edit your records
  actions  :index, :edit, :show, :update
end

Enable the destroy action without update action

ActiveAdmin.register Post do
  # Disable the new action and edit actions, but now you can delete records
  actions  :index, :destroy, :show
end
Clone this wiki locally