Class: Decidim::Verifications::IdDocuments::Admin::ConfigController
- Inherits:
-
Admin::ApplicationController
- Object
- Admin::ApplicationController
- Decidim::Verifications::IdDocuments::Admin::ConfigController
- Includes:
- Admin::WorkflowsBreadcrumb
- Defined in:
- app/controllers/decidim/verifications/id_documents/admin/config_controller.rb
Overview
Handles the configuration for the ID documents verification
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
17 18 19 20 21 |
# File 'app/controllers/decidim/verifications/id_documents/admin/config_controller.rb', line 17 def edit :update, :organization, organization: current_organization @form = form(ConfigForm).from_model(current_organization) end |
#update ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'app/controllers/decidim/verifications/id_documents/admin/config_controller.rb', line 23 def update :update, :organization, organization: current_organization @form = form(ConfigForm).from_params(params) UpdateConfig.call(@form) do on(:ok) do flash[:notice] = t("config.update.success", scope: "decidim.verifications.id_documents.admin") redirect_to end on(:invalid) do flash.now[:alert] = t("config.update.error", scope: "decidim.verifications.id_documents.admin") render action: :edit end end end |