From f27f0b623296ec790fc2ff7f77e74adb1946697a Mon Sep 17 00:00:00 2001 From: Rustam Sharshenov Date: Mon, 15 Sep 2014 16:05:35 +0600 Subject: [PATCH] Do not try to import empty records array --- lib/searchkick/logging.rb | 1 + 1 file changed, 1 insertion(+), 0 deletions(-) diff --git a/lib/searchkick/logging.rb b/lib/searchkick/logging.rb index c4469ce..0f6daba 100644 --- a/lib/searchkick/logging.rb +++ b/lib/searchkick/logging.rb @@ -38,6 +38,7 @@ module Searchkick alias_method_chain :remove, :instrumentation def import_with_instrumentation(records) + return unless records.any? event = { name: "#{records.first.searchkick_klass.name} Import", count: records.size -- libgit2 0.21.0