Sha256: 9462a0b23758556121dfeda82407aa3ff8349fe539214f14f638590f503e808d
Contents?: true
Size: 1.18 KB
Versions: 8
Compression:
Stored size: 1.18 KB
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" add_breadcrumb_item_from_menu :admin_settings_menu helper Decidim::Admin::UploaderImageDimensionsHelper def edit enforce_permission_to :update, :organization, organization: current_organization @form = form(OrganizationAppearanceForm).from_model(current_organization) end def update enforce_permission_to :update, :organization, organization: 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
8 entries across 8 versions & 1 rubygems