Sha256: e0d0c091190a99336e94429ca8543d0222d4aae8398d5c7bfdd7a82efe96a9a3
Contents?: true
Size: 532 Bytes
Versions: 7
Compression:
Stored size: 532 Bytes
Contents
module Elastics module ModelIndexer def self.included(base) base.class_eval do @elastics ||= ClassProxy::Base.new(base) @elastics.extend(ClassProxy::ModelSyncer) @elastics.extend(ClassProxy::ModelIndexer).init def self.elastics; @elastics end end end def elastics @elastics ||= InstanceProxy::ModelIndexer.new(self) end def elastics_source attributes.reject {|k| k.to_s =~ /^_*id$/} end def elastics_indexable? true end end end
Version data entries
7 entries across 7 versions & 1 rubygems