Sha256: 09450c3ccd418a8a01a20e16566e877f5ad43d9ffa2a9fdd2dfcb58c10be5ef9
Contents?: true
Size: 640 Bytes
Versions: 20
Compression:
Stored size: 640 Bytes
Contents
# frozen_string_literal: true module Decidim module Initiatives module Admin # A form object used to collect the all the initiative type attributes. class InitiativeTypeForm < Decidim::Form include TranslatableAttributes mimic :initiatives_type translatable_attribute :title, String translatable_attribute :description, String attribute :banner_image, String validates :title, :description, translatable_presence: true validates :banner_image, presence: true, if: lambda { |form| form.context.initiative_type.nil? } end end end end
Version data entries
20 entries across 20 versions & 1 rubygems