Class: SpreeSolrSearch::Engine
- Inherits:
-
Rails::Engine
- Object
- Rails::Engine
- SpreeSolrSearch::Engine
- Defined in:
- lib/spree_solr_search.rb
Class Method Summary collapse
Class Method Details
.activate ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/spree_solr_search.rb', line 6 def self.activate require 'websolr_acts_as_solr' ENV['RAILS_ENV'] = Rails.env if Spree::Config.instance Spree::Config.searcher_class = Spree::Search::Solr end Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c| Rails.env == "production" ? require(c) : load(c) end end |