mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Add mass actions w/ force delete to admin
This commit is contained in:
parent
7a6568c34a
commit
c72ca8d157
8 changed files with 76 additions and 3 deletions
19
app/controllers/admin/mass_actions_controller.rb
Normal file
19
app/controllers/admin/mass_actions_controller.rb
Normal file
|
@ -0,0 +1,19 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
class MassActionsController < BaseController
|
||||
authorize_resource
|
||||
|
||||
# GET /admin/disputes
|
||||
def index; end
|
||||
|
||||
# POST /admin/disputes
|
||||
def create
|
||||
res = MassAction.process(params[:mass_action], params[:entry_list].path)
|
||||
backlog = "#{params[:mass_action]} done for #{res[:ok].join(',')}.\n" \
|
||||
"Failed: objects: #{res[:fail].join(',')}"
|
||||
|
||||
redirect_to(admin_mass_actions_path, notice: backlog)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue