If you are talking about hiding the edit link, which is displayed by default (along with view and delete links) in the index action, you can customize the index view as follows:
ActiveAdmin.register Model do index do column :actions do |object| raw( %(#{link_to "View", [:admin, object]} #{link_to "Delete", [:admin, object], method: :delete} #{(link_to"Edit", [:edit, :admin, object]) if object.status? }) ) end end end
Since the contents of the column will only be what is returned by the column block, you need to immediately return all three (or two) links as a string. Here, raw used so that actual links are displayed, not html for links.
cdesrosiers
source share