Sha256: 73ced64c665d23cb5e1bbf8fd473596d908a47afcccbf719ae71027739bfe5e5
Contents?: true
Size: 884 Bytes
Versions: 13
Compression:
Stored size: 884 Bytes
Contents
# frozen_string_literal: true module Decidim module Conferences module Admin # A form object used to update conference diploma configuration # from the admin dashboard # class DiplomaForm < Form mimic :conference attribute :main_logo attribute :signature attribute :signature_name, String attribute :sign_date, Decidim::Attributes::LocalizedDate validates :signature_name, :sign_date, :main_logo, :signature, presence: true validates :main_logo, file_size: { less_than_or_equal_to: ->(_record) { Decidim.maximum_attachment_size } }, file_content_type: { allow: ["image/jpeg", "image/png"] } validates :signature, file_size: { less_than_or_equal_to: ->(_record) { Decidim.maximum_attachment_size } }, file_content_type: { allow: ["image/jpeg", "image/png"] } end end end end
Version data entries
13 entries across 13 versions & 1 rubygems