Sha256: de2c355be9ec46fa3e896eac4142d15bd82bf005ab870c02a87b02d067928f68

Contents?: true

Size: 482 Bytes

Versions: 47

Compression:

Stored size: 482 Bytes

Contents

class FormSubmissionData < ApplicationRecord
  # By saving the form submission data as a search index, you work around
  # possible slow searches for the form submissions.
  after_save do
    next if value.blank?
    index = form_submission.search_indices.find_or_initialize_by(
      locale: Udongo.config.i18n.app.default_locale,
      name: name
    )
    index.value = value
    index.save!
  end

  belongs_to :form_submission

  validates :form_submission, presence: true
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
udongo-7.9.0 app/models/form_submission_data.rb
udongo-7.8.1 app/models/form_submission_data.rb
udongo-7.8.0 app/models/form_submission_data.rb
udongo-7.7.2 app/models/form_submission_data.rb
udongo-7.7.1 app/models/form_submission_data.rb
udongo-7.7.0 app/models/form_submission_data.rb
udongo-7.6.2 app/models/form_submission_data.rb
udongo-7.6.1 app/models/form_submission_data.rb
udongo-7.6.0 app/models/form_submission_data.rb
udongo-7.5.1 app/models/form_submission_data.rb
udongo-7.5.0 app/models/form_submission_data.rb
udongo-7.4.2 app/models/form_submission_data.rb
udongo-7.4.1 app/models/form_submission_data.rb
udongo-7.4.0 app/models/form_submission_data.rb
udongo-7.3.5 app/models/form_submission_data.rb
udongo-7.3.4 app/models/form_submission_data.rb
udongo-7.3.3 app/models/form_submission_data.rb
udongo-7.3.2 app/models/form_submission_data.rb
udongo-7.3.1 app/models/form_submission_data.rb
udongo-7.2.1 app/models/form_submission_data.rb