Sha256: f3bb7107a13e82235a72d3b0a5b3f0f15787c80bae87ee61ebe18f4a5e4d7ad8
Contents?: true
Size: 771 Bytes
Versions: 34
Compression:
Stored size: 771 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 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_space.features.find(params[:feature_id]) end end end end
Version data entries
34 entries across 34 versions & 2 rubygems