Sha256: 4c8d88e733af8ce4d9122cef0e5141838ab4efe9e8ab3bcd5c1a1cb3e47a8872
Contents?: true
Size: 512 Bytes
Versions: 3
Compression:
Stored size: 512 Bytes
Contents
# frozen_string_literal: true require 'securerandom' class Admin::Tramway::Event::ParticipantForm < ::Tramway::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
3 entries across 3 versions & 1 rubygems