demarches-normaliennes/app/jobs/dossier_update_search_terms_job.rb
Colin Darie f6ebfe0e47
fix(dossier): sync search_terms after merge
Use a job instead of a lot of reloads
2023-05-09 18:49:52 +02:00

8 lines
191 B
Ruby

class DossierUpdateSearchTermsJob < ApplicationJob
discard_on ActiveRecord::RecordNotFound
def perform(dossier)
dossier.update_search_terms
dossier.save!(touch: false)
end
end