lib/elasticsearch/rails/instrumentation/railtie.rb in elasticsearch-rails-0.1.5 vs lib/elasticsearch/rails/instrumentation/railtie.rb in elasticsearch-rails-0.1.6
- old
+ new
@@ -12,10 +12,14 @@
require 'elasticsearch/rails/instrumentation/log_subscriber'
require 'elasticsearch/rails/instrumentation/controller_runtime'
Elasticsearch::Model::Searching::SearchRequest.class_eval do
include Elasticsearch::Rails::Instrumentation::Publishers::SearchRequest
- end
+ end if defined?(Elasticsearch::Model::Searching::SearchRequest)
+
+ Elasticsearch::Persistence::Model::Find::SearchRequest.class_eval do
+ include Elasticsearch::Rails::Instrumentation::Publishers::SearchRequest
+ end if defined?(Elasticsearch::Persistence::Model::Find::SearchRequest)
ActiveSupport.on_load(:action_controller) do
include Elasticsearch::Rails::Instrumentation::ControllerRuntime
end
end