Sha256: 0a5677ab68bdfb22c7cd873a94f68288ff6a0dce6b2461e2e5c598c0cd688518

Contents?: true

Size: 416 Bytes

Versions: 9

Compression:

Stored size: 416 Bytes

Contents

# frozen_string_literal: true

class Tramway::Event::ParticipantFormField < ::Tramway::Event::ApplicationRecord
  belongs_to :event, class_name: 'Tramway::Event::Event'

  enumerize :field_type, in: %i[text string numeric date_picker select], default: :text

  scope :inputs_list, -> { active.order(position: :asc) }

  def required
    options.present? && options.dig('validations', 'presence') == 'true'
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
tramway-event-1.11.1 app/models/tramway/event/participant_form_field.rb
tramway-event-1.11.0.1 app/models/tramway/event/participant_form_field.rb
tramway-event-1.11 app/models/tramway/event/participant_form_field.rb
tramway-event-1.10.2 app/models/tramway/event/participant_form_field.rb
tramway-event-1.10.1 app/models/tramway/event/participant_form_field.rb
tramway-event-1.10.0.2 app/models/tramway/event/participant_form_field.rb
tramway-event-1.10.0.1 app/models/tramway/event/participant_form_field.rb
tramway-event-1.10 app/models/tramway/event/participant_form_field.rb
tramway-event-1.9.31.2 app/models/tramway/event/participant_form_field.rb