Sha256: d3f9e20dd423568252ef2874ecaf9a580a90550c70c8cf7c3fcf38abaf89771e
Contents?: true
Size: 823 Bytes
Versions: 4
Compression:
Stored size: 823 Bytes
Contents
# frozen_string_literal: true module Decidim module Admin # This controller allows admins to manage proposals in a participatory process. class ExportsController < Decidim::Admin::ApplicationController include Concerns::ParticipatoryProcessAdmin include Decidim::FeaturePathHelper def create authorize! :manage, feature name = params[:id] ExportJob.perform_later(current_user, feature, name, params[:format] || default_format) flash[:notice] = t("decidim.admin.exports.notice") redirect_back(fallback_location: manage_feature_path(feature)) end private def default_format "json" end def feature @feature ||= current_participatory_process.features.find(params[:feature_id]) end end end end
Version data entries
4 entries across 4 versions & 2 rubygems