From c130e6c42beffcf33f9d9ef87224a3ae46283529 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 28 Feb 2018 20:01:42 -0800 Subject: [PATCH] No more _default_ type --- lib/searchkick/index_options.rb | 2 +- lib/searchkick/model.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/searchkick/index_options.rb b/lib/searchkick/index_options.rb index 45f9250..91cfb35 100644 --- a/lib/searchkick/index_options.rb +++ b/lib/searchkick/index_options.rb @@ -4,7 +4,7 @@ module Searchkick options = @options language = options[:language] language = language.call if language.respond_to?(:call) - type = options[:_type] || :_default_ + type = options[:_type] type = type.call if type.respond_to?(:call) if options[:mappings] && !options[:merge_mappings] diff --git a/lib/searchkick/model.rb b/lib/searchkick/model.rb index 14632c0..7190076 100644 --- a/lib/searchkick/model.rb +++ b/lib/searchkick/model.rb @@ -12,7 +12,7 @@ module Searchkick Searchkick.models << self - options[:_type] ||= -> { searchkick_index.klass_document_type(self, true) } if options[:inheritance] + options[:_type] ||= -> { searchkick_index.klass_document_type(self, true) } class_eval do cattr_reader :searchkick_options, :searchkick_klass -- libgit2 0.21.0