lib/georgia/indexer/solr_adapter.rb in georgia-0.7.5 vs lib/georgia/indexer/solr_adapter.rb in georgia-0.7.6

- old
+ new

@@ -1,14 +1,13 @@ -require 'sunspot_rails' if defined?(Sunspot) -Dir[File.join(File.dirname(__FILE__), 'extensions', 'solr_adapter', '*.rb')].each {|file| require file } - module Georgia module Indexer - class SolrAdapter + module SolrAdapter + require 'sunspot_rails' if defined?(Sunspot) + # Delegate search_index to the model # Search method is taken by Sunspot - def search model, params + def self.search model, params model.search_index model, params end end end \ No newline at end of file