Sha256: fd30876c7b3e62cfcb10ed9e47aa34efe8b745769b9afa9786961d351a8ccd36
Contents?: true
Size: 621 Bytes
Versions: 37
Compression:
Stored size: 621 Bytes
Contents
# frozen_string_literal: true module Decidim module Admin # This form handles a set of forms related to handling permissions # in the admin panel. class PermissionsForm < Form mimic :component_permissions attribute :permissions, Hash[String => PermissionForm] private # Overriding Rectify::Form#form_attributes_valid? to preserve errors from custom method validations. def form_attributes_valid? return false unless errors.empty? && permissions.each_value.map(&:errors).all?(&:empty?) super && permissions.values.all?(&:valid?) end end end end
Version data entries
37 entries across 37 versions & 1 rubygems