Skip to content

Adding Custom Buttons To Active Admin

January 26, 2012

While there doesn’t appear to be explicit support for managing the buttons that appear in the top right of active admin (“New Share”, “Delete”, etc.) I did some digging and managed to find a solution.

ActiveAdmin.register Share do

 action_item only:[:show] do
   link_to "Message Customers", new_admin_share_blast_path(share_blast:{share_id:share})


Calling the action_item method will print the contents of the block as a button in the area in question.  You can control which pages you would like the custom action item to be displayed on by passing a hash with either an :except or :only key.


From → Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: