Sha256: 81219b0ff1f78db44d9459f3470c1d74770925c16b7929680ac2ec9a223b1bb6
Contents?: true
Size: 583 Bytes
Versions: 8
Compression:
Stored size: 583 Bytes
Contents
# frozen_string_literal: true require 'securerandom' class Tramway::Event::ParticipantForm < ::Tramway::Core::ApplicationForm properties :participation_state_event, :comment association :event def self.new(object) if object.event_id.present? ::Tramway::Event::ParticipantExtendedFormCreator.create_form_class( SecureRandom.hex, object.event, comment: :string, participation_state_event: :string ).new object else super(object).tap do |obj| obj.form_properties event: :association end end end end
Version data entries
8 entries across 8 versions & 1 rubygems