Class: Decidim::DecidimAwesome::Admin::MaintenanceController
- Inherits:
-
ApplicationController
- Object
- Admin::ApplicationController
- ApplicationController
- Decidim::DecidimAwesome::Admin::MaintenanceController
- Includes:
- ActionView::Helpers::DateHelper, Admin::Filterable, MaintenanceContext, NeedsAwesomeConfig
- Defined in:
- app/controllers/decidim/decidim_awesome/admin/maintenance_controller.rb
Overview
System compatibility analyzer
Instance Method Summary collapse
Methods included from NeedsAwesomeConfig
Methods inherited from ApplicationController
Instance Method Details
#destroy_private_data ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'app/controllers/decidim/decidim_awesome/admin/maintenance_controller.rb', line 33 def destroy_private_data if private_data && private_data.total.to_i.positive? Decidim::ActionLogger.log("destroy_private_data", current_user, resource, nil, count: private_data.total) Lock.new(current_organization).get!(resource) DestroyPrivateDataJob.set(wait: 1.second).perform_later(resource) end redirect_to decidim_admin_decidim_awesome.maintenance_path("private_data"), notice: I18n.t("destroying_private_data", scope: "decidim.decidim_awesome.admin.maintenance.private_data", title: present_private_data(resource).name) end |
#show ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'app/controllers/decidim/decidim_awesome/admin/maintenance_controller.rb', line 22 def show respond_to do |format| format.json do render json: private_data_finder.for(params[:resources].to_s.split(",")).map { |resource| present(resource) } end format.all do render :show end end end |