mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 21:25:39 +02:00
19 lines
490 B
Ruby
19 lines
490 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Admin
|
|
class MassActionsController < BaseController
|
|
authorize_resource
|
|
|
|
# GET /admin/mass_actions
|
|
def index; end
|
|
|
|
# POST /admin/mass_actions
|
|
def create
|
|
res = MassAction.process(params[:mass_action], params[:entry_list].path)
|
|
backlog = "#{params[:mass_action]} completed for #{res[:ok]}.\n" \
|
|
"Failed: objects: #{res[:fail]}"
|
|
|
|
redirect_to(admin_mass_actions_path, notice: backlog)
|
|
end
|
|
end
|
|
end
|