Commit 5532ca79ffd78a7630b4d393965c936e08be3dc2

Authored by Andrew Kane
1 parent ad006fd9

Fixed tests

lib/searchkick/index.rb
... ... @@ -254,7 +254,7 @@ module Searchkick
254 254 scope = scope.search_import if scope.respond_to?(:search_import)
255 255  
256 256 if batch
257   - import_or_update scope.to_a, method_name, async, delete_missing, record_ids, scope.model
  257 + import_or_update scope.to_a, method_name, async, delete_missing, record_ids, scope.model_name.name.constantize
258 258 Searchkick.redis.srem(batches_key, batch_id) if batch_id && Searchkick.redis
259 259 elsif full && async
260 260 if scope.respond_to?(:primary_key)
... ...
lib/searchkick/process_queue_job.rb
... ... @@ -11,7 +11,7 @@ module Searchkick
11 11 Searchkick::BulkReindexJob.perform_later(
12 12 class_name: model.name,
13 13 record_ids: record_ids,
14   - delete: true
  14 + delete_missing: true
15 15 )
16 16 # TODO when moving to reliable queuing, mark as complete
17 17  
... ...