Sha256: a45f5c6e60227fa95e1859e98507361d9b453ea6a28027e477d074fc7fd0e1ba
Contents?: true
Size: 989 Bytes
Versions: 49
Compression:
Stored size: 989 Bytes
Contents
# frozen_string_literal: true module Decidim module ParticipatoryProcesses module Admin class ParticipatoryProcessImportsController < Decidim::ParticipatoryProcesses::Admin::ApplicationController def new enforce_permission_to :import, :process @form = form(ParticipatoryProcessImportForm).instance end def create enforce_permission_to :import, :process @form = form(ParticipatoryProcessImportForm).from_params(params) ImportParticipatoryProcess.call(@form) do on(:ok) do flash[:notice] = I18n.t("participatory_process_imports.create.success", scope: "decidim.admin") redirect_to participatory_processes_path end on(:invalid) do flash.now[:alert] = I18n.t("participatory_process_imports.create.error", scope: "decidim.admin") render :new end end end end end end end
Version data entries
49 entries across 49 versions & 1 rubygems