Sha256: 2fd59437f15c202e0de5fde6ae51b566219c9f91ac04a9eeee29e422189c528f
Contents?: true
Size: 701 Bytes
Versions: 13
Compression:
Stored size: 701 Bytes
Contents
# frozen_string_literal: true module Decidim module DecidimAwesome module Admin class ConstraintForm < Decidim::Form attribute :id, Integer attribute :participatory_space_manifest, String attribute :participatory_space_slug, String attribute :component_manifest, String attribute :component_id, Integer validates :component_manifest, absence: true, if: lambda { |form| form.component_id.present? || ConfigConstraintsHelpers::OTHER_MANIFESTS.include?(form.participatory_space_manifest&.to_sym) } validates :component_id, absence: true, if: ->(form) { form.component_manifest.present? } end end end end
Version data entries
13 entries across 13 versions & 1 rubygems