ruby-on-railsactiveadmin

ActiveAdmin rails remove "New Object" button from header of index page specific resource


The index page for an ActiveAdmin resource by default contains a button to go to the form to create a new instance of that object

Active Admin Header with New button

I have a view with is a composite list of multiple times of items where a new button does not make sense. Is there a way to remove that button on only that resource?


Solution

  • ActiveAdmin.register Action do
      actions :all, except: :new
    end
    

    Something like that. Like that you can disable any action you desire