Sha256: e2c3a12da2073aca444cfec67c0a6e9bd43aa01ad9e69f10a62c2f1f9b4eb094
Contents?: true
Size: 1006 Bytes
Versions: 19
Compression:
Stored size: 1006 Bytes
Contents
# frozen_string_literal: true module Decidim module Admin # Controller that allows managing the appearance of the organization. class OrganizationAppearanceController < Decidim::Admin::ApplicationController layout "decidim/admin/settings" def edit authorize! :update, current_organization @form = form(OrganizationAppearanceForm).from_model(current_organization) end def update authorize! :update, current_organization @form = form(OrganizationAppearanceForm).from_params(params) UpdateOrganizationAppearance.call(current_organization, @form) do on(:ok) do flash[:notice] = I18n.t("organization.update.success", scope: "decidim.admin") redirect_to edit_organization_appearance_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