Sha256: 1852c471f5f096d19c91eb32fc30e4b4e4625346c5a8f08e172d70584ba0df07

Contents?: true

Size: 382 Bytes

Versions: 5

Compression:

Stored size: 382 Bytes

Contents

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

  include Concerns::Translatable
  translatable_fields :label, :default_value, :placeholder

  belongs_to :form
  has_many :validations,
    class_name: 'FormFieldValidation',
    foreign_key: :field_id,
    dependent: :destroy

  validates :form, :name, :field_type, presence: true
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
udongo-2.0.4 app/models/form_field.rb
udongo-2.0.3 app/models/form_field.rb
udongo-2.0.2 app/models/form_field.rb
udongo-2.0.1 app/models/form_field.rb
udongo-2.0.0 app/models/form_field.rb