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