Sha256: 79d6d36f2eb79ab610c6160cbb124b2c031281e6bac4f8fc67cfa4b528cf9644
Contents?: true
Size: 571 Bytes
Versions: 16
Compression:
Stored size: 571 Bytes
Contents
# frozen_string_literal: true require 'securerandom' class Tramway::Event::ParticipantForm < ::Tramway::Core::ApplicationForm properties :participation_state, :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: :string ).new object else super(object).tap do |obj| obj.form_properties event: :association end end end end
Version data entries
16 entries across 16 versions & 1 rubygems