Sha256: 78e337321d834d3de7db1f354c582974885f09911530d98ff71cc47f50c45800

Contents?: true

Size: 376 Bytes

Versions: 43

Compression:

Stored size: 376 Bytes

Contents

class FormField < ApplicationRecord
  include Concerns::Sortable
  sortable scope: [:form_id]

  include Concerns::Translatable
  translatable_fields :label, :default_value

  FIELD_TYPES = %w(string text integer collection email tel)

  belongs_to :form

  validates :form, :identifier, :field_type, presence: true

  validates_uniqueness_of :identifier, scope: :form_id
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
udongo-6.3.1 app/models/form_field.rb
udongo-6.3.0 app/models/form_field.rb
udongo-6.2.1 app/models/form_field.rb