Class: Decidim::Admin::ExportsController
- Inherits:
-
ApplicationController
- Object
- DecidimController
- ApplicationController
- Decidim::Admin::ExportsController
- Includes:
- ComponentPathHelper
- Defined in:
- decidim-admin/app/controllers/decidim/admin/exports_controller.rb
Overview
This controller allows admins to manage proposals in a participatory process.
Direct Known Subclasses
Decidim::Assemblies::Admin::ExportsController, Conferences::Admin::ExportsController, Initiatives::Admin::ExportsController, ParticipatoryProcesses::Admin::ExportsController, Votings::Admin::ExportsController
Instance Method Summary collapse
Methods included from ComponentPathHelper
#can_be_managed?, #main_component_path, #main_component_url, #manage_component_path
Methods inherited from ApplicationController
#permission_class_chain, #permission_scope, #user_has_no_permission_path, #user_not_authorized_path
Methods included from Headers::HttpCachingDisabler
Methods included from NeedsSnippets
Methods included from RegistersPermissions
Methods included from NeedsOrganization
enhance_controller, extended, included
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'decidim-admin/app/controllers/decidim/admin/exports_controller.rb', line 9 def create (:export, :component_data, component:) name = params[:id] Decidim.traceability.perform_action!("export_component", component, current_user, { name:, format: params[:format] || default_format }) do ExportJob.perform_later(current_user, component, name, params[:format] || default_format, params[:resource_id].presence) end flash[:notice] = t("decidim.admin.exports.notice") redirect_back(fallback_location: manage_component_path(component)) end |