Sha256: 88276e0eebfc01c72e6c8014cd8842c2d0024758edb1a8e39fda06d168ca73da
Contents?: true
Size: 540 Bytes
Versions: 48
Compression:
Stored size: 540 Bytes
Contents
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
48 entries across 48 versions & 1 rubygems