Sha256: e4250265d8b72b942bea8a5c5d0583fd9b734bbf1c31a212c0d4aaee484eae28
Contents?: true
Size: 620 Bytes
Versions: 2
Compression:
Stored size: 620 Bytes
Contents
module Actions module ElasticSearch class ReindexOnAssociationChange < ElasticSearch::Abstract def plan(record) plan_self(id: record.id, class_name: record.class.name) end input_format do param :id param :class_name end def finalize model_class = input[:class_name].constantize record = model_class.find_by_id(input[:id]) if record record.update_index if record.respond_to? :update_index record.class.index.refresh if record.class.respond_to? :index end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
katello-2.4.0.rc2 | app/lib/actions/elastic_search/reindex_on_association_change.rb |
katello-2.4.0.rc1 | app/lib/actions/elastic_search/reindex_on_association_change.rb |