From 41bb6c6080dd5cd52a18592e0c768fae6fcc9ba8 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Wed, 26 Nov 2014 03:32:36 -0800 Subject: [PATCH] More --- lib/searchkick/model.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/searchkick/model.rb b/lib/searchkick/model.rb index e64ca73..0a58b47 100644 --- a/lib/searchkick/model.rb +++ b/lib/searchkick/model.rb @@ -1,4 +1,6 @@ module Searchkick + module Reindex; end # legacy for Searchjoy + module Model def searchkick(options = {}) @@ -19,13 +21,14 @@ module Searchkick define_singleton_method(Searchkick.search_method_name) do |term = nil, options={}, &block| searchkick_index.search_model(self, term, options, &block) end + extend Searchkick::Reindex # legacy for Searchjoy class << self def searchkick_index index = class_variable_get :@@searchkick_index index = index.call if index.respond_to? :call - Searchkick::Index.new(index, class_variable_get(:@@searchkick_options)) + Searchkick::Index.new(index, searchkick_options) end def enable_search_callbacks -- libgit2 0.21.0