Sha256: 51c0a58a767b8a7ebacff590b8ae775d579ac6d25e34ab2e3cce10dd2f1ace57
Contents?: true
Size: 948 Bytes
Versions: 19
Compression:
Stored size: 948 Bytes
Contents
# frozen_string_literal: true module Decidim module Admin # Controller that allows managing the user organization. # class OrganizationController < Decidim::Admin::ApplicationController layout "decidim/admin/settings" def edit authorize! :update, current_organization @form = form(OrganizationForm).from_model(current_organization) end def update authorize! :update, current_organization @form = form(OrganizationForm).from_params(params) UpdateOrganization.call(current_organization, @form) do on(:ok) do flash[:notice] = I18n.t("organization.update.success", scope: "decidim.admin") redirect_to edit_organization_path end on(:invalid) do flash.now[:alert] = I18n.t("organization.update.error", scope: "decidim.admin") render :edit end end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems