From 8e9f976bff924ae8778535682a6ecfa108fd81e6 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 2 Mar 2018 10:51:06 -0800 Subject: [PATCH] Fixed tests [skip ci] --- lib/searchkick/model.rb | 2 +- lib/searchkick/record_indexer.rb | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/searchkick/model.rb b/lib/searchkick/model.rb index 8091c82..2fd6bfc 100644 --- a/lib/searchkick/model.rb +++ b/lib/searchkick/model.rb @@ -37,7 +37,7 @@ module Searchkick alias_method :search_index, :searchkick_index unless method_defined?(:search_index) def searchkick_reindex(method_name = nil, full: false, **options) - return unless Searchkick.callbacks? + # return unless Searchkick.callbacks? scoped = (respond_to?(:current_scope) && respond_to?(:default_scoped) && current_scope && current_scope.to_sql != default_scoped.to_sql) || (respond_to?(:queryable) && queryable != unscoped.with_default_scope) diff --git a/lib/searchkick/record_indexer.rb b/lib/searchkick/record_indexer.rb index 298bf75..dd8cd67 100644 --- a/lib/searchkick/record_indexer.rb +++ b/lib/searchkick/record_indexer.rb @@ -84,7 +84,7 @@ module Searchkick end if !source.key?("type") && record.class.searchkick_klass.searchkick_options[:inheritance] - source["type"] = document_type(record, true) + source["type"] = document_type(true) end cast_big_decimal(source) @@ -92,8 +92,6 @@ module Searchkick source end - private - def location_value(value) if value.is_a?(Array) value.map(&:to_f).reverse -- libgit2 0.21.0