Sha256: 52182d6d433e85d6535323672475384ee1fddaed498fbfa629a57dd66a9a6d89
Contents?: true
Size: 730 Bytes
Versions: 22
Compression:
Stored size: 730 Bytes
Contents
# frozen_string_literal: true module Decidim module Admin # A form object used to create participatory process groups from the admin # dashboard. # class ParticipatoryProcessGroupForm < Form include TranslatableAttributes translatable_attribute :name, String translatable_attribute :description, String attribute :participatory_process_ids, Array[Integer] mimic :participatory_process_group attribute :hero_image validates :name, :description, translatable_presence: true validates :hero_image, file_size: { less_than_or_equal_to: ->(_record) { Decidim.maximum_attachment_size } }, file_content_type: { allow: ["image/jpeg", "image/png"] } end end end
Version data entries
22 entries across 22 versions & 2 rubygems