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