Class: Tramway::Event::ParticipantFormField

Inherits:
Core::ApplicationRecord
  • Object
show all
Defined in:
app/models/tramway/event/participant_form_field.rb

Instance Method Summary collapse

Instance Method Details

#requiredObject



10
11
12
# File 'app/models/tramway/event/participant_form_field.rb', line 10

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

#validationsObject



14
15
16
# File 'app/models/tramway/event/participant_form_field.rb', line 14

def validations
  (options == '' ? {} : options)&.dig('validations')
end