Sha256: d189bc680fb24e079a28ae0c374dffa320cef8e519302abcb2d0217812931d18
Contents?: true
Size: 389 Bytes
Versions: 1
Compression:
Stored size: 389 Bytes
Contents
module Spotlight class RenameSidecarFieldJob < ActiveJob::Base queue_as :default def perform(exhibit, old_field, new_field) exhibit.solr_document_sidecars.find_each do |s| if s.data[old_field] s.data_will_change! s.data[new_field] = s.data.delete(old_field) s.save s.document.reindex end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
blacklight-spotlight-0.4.1 | app/jobs/spotlight/rename_sidecar_field_job.rb |