From 81f73ff7f97c9fbb876932bd2a54f770bf09721b Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 2 Mar 2018 15:21:09 -0800 Subject: [PATCH] Call out to ActiveSupport for notications [skip ci] --- lib/searchkick/bulk_indexer.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/searchkick/bulk_indexer.rb b/lib/searchkick/bulk_indexer.rb index b5e9dc0..7227837 100644 --- a/lib/searchkick/bulk_indexer.rb +++ b/lib/searchkick/bulk_indexer.rb @@ -63,7 +63,12 @@ module Searchkick records = records.select(&:should_index?) if records.any? with_retries do - method_name ? bulk_update(records, method_name) : bulk_index(records) + # call out to index for ActiveSupport notifications + if method_name + index.bulk_update(records, method_name) + else + index.bulk_index(records) + end end end end -- libgit2 0.21.0