Sha256: affea40f0620d86cd6a7edea6f0592e735d70e2038da89201e7dbd8fdebb715f

Contents?: true

Size: 438 Bytes

Versions: 3

Compression:

Stored size: 438 Bytes

Contents

require "locomotive/engine"

module Locomotive::Search
  def self.const_missing(const)
    if const.to_s == "Extension"
      require "activesearch/#{Locomotive.config.search_engine}"
      const_set(const, ::ActiveSearch.const_get(Locomotive.config.search_engine.to_s.camelize))
    end
  end
  
  class Engine < ::Rails::Engine
    initializer "locomotive.search.concerns" do
      require "locomotive/search/concerns"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
locomotivecms-search-0.1.0 lib/locomotive/search/engine.rb
locomotivecms-search-0.0.5 lib/locomotive/search/engine.rb
locomotivecms-search-0.0.4 lib/locomotive/search/engine.rb