module EagleSearch

Constants

VERSION

Public Class Methods

client() click to toggle source
# File lib/eagle_search.rb, line 19
def self.client
  @client ||= Elasticsearch::Client.new
end
env() click to toggle source
# File lib/eagle_search.rb, line 23
def self.env
  @env ||= ENV['RAILS_ENV'] || "development"
end
included(base) click to toggle source
# File lib/eagle_search.rb, line 13
def self.included(base)
  base.extend(EagleSearch::Model::ClassMethods)
  base.include(EagleSearch::Model::InstanceMethods)
  base.after_commit :reindex, on: [:create, :update]
end