Sha256: 1f8b605efa831e5e2caa2e5f95fbc54820faa911d0a2a64289ca960d6adf707e
Contents?: true
Size: 576 Bytes
Versions: 14
Compression:
Stored size: 576 Bytes
Contents
# frozen_string_literal: true class Tramway::Event::ParticipantFormFieldForm < ::Tramway::Core::ApplicationForm properties :title, :description, :field_type, :options, :position association :event def initialize(object) super(object).tap do form_properties event: :association, title: :string, description: :string, field_type: :default, options: :text, position: :numeric end end def options model.options&.to_json end def options=(value) super value == '' ? value : JSON.parse(value) end end
Version data entries
14 entries across 14 versions & 1 rubygems