Sha256: 286b53b4e4650184e1de598f663a8128a21547b517e0f6bc5a6a152788ae8cf4
Contents?: true
Size: 675 Bytes
Versions: 3
Compression:
Stored size: 675 Bytes
Contents
# frozen_string_literal: true class Tramway::Event::ParticipantExtendedFormCreator < Tramway::Core::FormCreator def self.create_form_class(uuid, event, **simple_properties) class_name = "ParticipantExtendedForm#{uuid.gsub('-', '')}" properties = event.participant_form_fields.inputs_list.reduce({}) do |hash, field| hash.merge! field.title.to_sym => { object: field, validates: field.options&.dig('validations') } end if simple_properties.keys.any? ::Tramway::Core::ExtendableForm.new(class_name, simple_properties: simple_properties, **properties) else ::Tramway::Core::ExtendableForm.new(class_name, **properties) end end end
Version data entries
3 entries across 3 versions & 1 rubygems