background_job_search_index.rb 246 B

1234567891011
  1. # perform background job
  2. class ApplicationModel::BackgroundJobSearchIndex
  3. def initialize(object, o_id)
  4. @object = object
  5. @o_id = o_id
  6. end
  7. def perform
  8. Object.const_get(@object).find(@o_id).search_index_update_backend
  9. end
  10. end