lib/searchkick/bulk_indexer.rb in searchkick-4.0.2 vs lib/searchkick/bulk_indexer.rb in searchkick-4.1.0

- old
+ new

@@ -59,11 +59,11 @@ def import_or_update(records, method_name, async) if records.any? if async Searchkick::BulkReindexJob.perform_later( - class_name: records.first.class.name, + class_name: records.first.class.searchkick_options[:class_name], record_ids: records.map(&:id), index_name: index.name, method_name: method_name ? method_name.to_s : nil ) else @@ -138,10 +138,10 @@ end def bulk_reindex_job(scope, batch_id, options) Searchkick.with_redis { |r| r.sadd(batches_key, batch_id) } Searchkick::BulkReindexJob.perform_later({ - class_name: scope.model_name.name, + class_name: scope.searchkick_options[:class_name], index_name: index.name, batch_id: batch_id }.merge(options)) end