Active Admin Action Item/member Action
Answer :
This can be done with the following:
ActiveAdmin.register Post do index do column :name actions defaults: true do |post| link_to 'Archive', archive_admin_post_path(post) end end end Note that using defaults: true will append your custom actions to active admin default actions.
For the friend who landed the page, In order to append more than 1 link
Do Something Like:
actions default: true do |model| [ link_to('Option 1', "#"), ' ', link_to('Option 2', "#") ].reduce(:+).html_safe end Found an answer here. You can do it using the below code with the code from the question (removing the action item block)
index do ... actions do |subscription| link_to('Approve', approve_admin_subscription_path(subscription)) end ... end But I think there is a way to do it by appending an action to the default actions (so if you know how to do that, then add another answer!)
Additionally to remove the defaults you can change it like it is here:
actions :defaults => false do |subscription|
Comments
Post a Comment