Class: Decidim::ActionDelegator::Admin::Consultations::ExportsController
- Inherits:
-
ApplicationController
- Object
- Decidim::Admin::ApplicationController
- ApplicationController
- Decidim::ActionDelegator::Admin::Consultations::ExportsController
show all
- Includes:
- Consultations::NeedsConsultation, NeedsPermission
- Defined in:
- app/controllers/decidim/action_delegator/admin/consultations/exports_controller.rb
Instance Method Summary
collapse
#permission_class_chain
Instance Method Details
#create ⇒ Object
11
12
13
14
15
16
17
18
|
# File 'app/controllers/decidim/action_delegator/admin/consultations/exports_controller.rb', line 11
def create
enforce_permission_to :export_consultation_results, :consultation, consultation: current_consultation
ExportConsultationResultsJob.perform_later(current_user, current_consultation, type)
flash[:notice] = t("decidim.admin.exports.notice")
redirect_back(fallback_location: decidim_admin_consultations.results_consultation_path(current_consultation))
end
|
#type ⇒ Object
20
21
22
|
# File 'app/controllers/decidim/action_delegator/admin/consultations/exports_controller.rb', line 20
def type
"type_and_weight"
end
|