Sha256: a9450bb6b5c5a66fae78a755517f3e233e19d52142427eee82e2fde9a850d93c
Contents?: true
Size: 526 Bytes
Versions: 25
Compression:
Stored size: 526 Bytes
Contents
module Mongoid module Elasticsearch module Indexing extend ActiveSupport::Concern included do def as_indexed_json serializable_hash.reject { |k, v| %w(_id c_at u_at created_at updated_at).include?(k) } end def es_index? true end def es_update if destroyed? || !es_index? self.class.es.remove_item(self) else self.class.es.index_item(self) end end end end end end
Version data entries
25 entries across 25 versions & 2 rubygems