Sha256: 0179742001b0aa18326364f3c75e78d143875d3e05e0c3323ab9edc1d74c4b05
Contents?: true
Size: 1.12 KB
Versions: 46
Compression:
Stored size: 1.12 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" 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
46 entries across 46 versions & 1 rubygems