Is it possible to have the
include Elasticsearch::Model
include Elasticsearch::Model::Callbacks
on a module? and how so?
You may use included block of ActiveSupport::Concern to include these modules
Something like:
module MyElasticSupport
extend ActiveSupport::Concern
included do
include Elasticsearch::Model
include Elasticsearch::Model::Callbacks
end
... some other code ...
end
class MyModel
include MyElasticSupport
... some other code ...
end
extend instead of include for MyElasticSupport