From 3613c61c63c3d41ca324bb67dace08916f1e3bae Mon Sep 17 00:00:00 2001 From: Marc Anguera Insa Date: Wed, 1 May 2024 20:27:25 +0200 Subject: [PATCH] [admin] enable bulk delete for users --- app/admin/user.rb | 3 +++ config/initializers/active_admin.rb | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/admin/user.rb b/app/admin/user.rb index fe8ec828..dc0de5e0 100644 --- a/app/admin/user.rb +++ b/app/admin/user.rb @@ -1,4 +1,6 @@ ActiveAdmin.register User do + config.batch_actions = true + action_item :upload_csv, only: :index do link_to I18n.t("active_admin.users.upload_from_csv"), action: "upload_csv" end @@ -15,6 +17,7 @@ end index do + selectable_column column do |user| link_to image_tag(avatar_url(user, 24)), admin_user_path(user) end diff --git a/config/initializers/active_admin.rb b/config/initializers/active_admin.rb index 135f86fa..7cfbf91f 100644 --- a/config/initializers/active_admin.rb +++ b/config/initializers/active_admin.rb @@ -7,7 +7,6 @@ config.current_user_method = :current_user config.logout_link_path = :destroy_user_session_path config.logout_link_method = :delete - config.batch_actions = false config.comments = false config.namespace :admin do |admin| admin.build_menu :utility_navigation do |menu|