Sha256: 7d766a0cdc3da040448a59d3494794833ba99adc5479b608c320da71ab417619
Contents?: true
Size: 497 Bytes
Versions: 6
Compression:
Stored size: 497 Bytes
Contents
# frozen_string_literal: true class Tramway::Event::ParticipantFormField < ::Tramway::Core::ApplicationRecord belongs_to :event, class_name: 'Tramway::Event::Event' enumerize :field_type, in: %i[text string numeric date_picker select checkbox], default: :text scope :inputs_list, -> { order(position: :asc) } def required options.present? && options.dig('validations', 'presence') == 'true' end def validations (options == '' ? {} : options)&.dig('validations') end end
Version data entries
6 entries across 6 versions & 1 rubygems