class ActiveAdmin::Views::IndexAsTable::IndexTableFor
def actions(options = {}, &block)
end
item 'Grant Admin', grant_admin_admin_user_path(admin_user)
actions defaults: false, dropdown: true, dropdown_name: 'Additional actions' do |admin_user|
# Custom actions without the defaults displayed in a Dropdown Menu.
end
item 'Grant Admin', grant_admin_admin_user_path(admin_user)
actions dropdown: true do |admin_user|
# Append some actions onto the end of the default actions displayed in a Dropdown Menu
end
item 'Grant Admin', grant_admin_admin_user_path(admin_user)
actions defaults: false do |admin_user|
# Custom actions without the defaults.
end
a 'Grant Admin', href: grant_admin_admin_user_path(admin_user)
actions do |admin_user|
# Append some actions onto the end of the default actions using arbre dsl.
end
item 'Grant User', grant_user_admin_user_path(admin_user)
item 'Grant Admin', grant_admin_admin_user_path(admin_user)
actions do |admin_user|
# Append some actions onto the end of the default actions.
actions name: 'A title!'
# Add default links with a custom column title (empty by default).
actions
# Add default links.
```ruby
Add links to perform actions.
def actions(options = {}, &block) name = options.delete(:name) { '' } defaults = options.delete(:defaults) { true } dropdown = options.delete(:dropdown) { false } dropdown_name = options.delete(:dropdown_name) { I18n.t 'active_admin.dropdown_actions.button_label', default: 'Actions' } options[:class] ||= 'col-actions' column name, options do |resource| if dropdown dropdown_menu dropdown_name do defaults(resource) if defaults instance_exec(resource, &block) if block_given? end else table_actions do defaults(resource, css_class: :member_link) if defaults if block_given? block_result = instance_exec(resource, &block) text_node block_result unless block_result.is_a? Arbre::Element end end end end end