mongoid-elasticsearch 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2559bd797b3eed2d0e1a4df0af70138d2aec1aa7
4
- data.tar.gz: 79a7f7b26146a19c65a8809c0407f81653928cc8
3
+ metadata.gz: 553691b47f099f7ce35b48bab9f8f15f7e969624
4
+ data.tar.gz: bfba44469d169221d85748cd32a0c4537472fb4c
5
5
  SHA512:
6
- metadata.gz: 26dd95496d9e3e91995acf8f54ee4af452e829bb123f499928568358aa66c4159d3f77125fe771fcc7a85ebe92db4d8d55066524cf512c8f7d006f14044ac11c
7
- data.tar.gz: a32793c4246ee7601fe208271b6b468dc56778f09a25fe968ef7098ac89f9cb1a3a4c2466d561766aaaf3c21437d6a713073bc8c73e97cc32e6a29a02bbc51d6
6
+ metadata.gz: e693de712fb4029acfa93b3a9dd94a320f8759d15dc650d2cf681cfdb6014001aa6b789e4e9481467b00300e50485e8afba1419c368ea34dc3bce0ec52f55d89
7
+ data.tar.gz: 5ec5511e85bdb60ddec9d570a7d8b5dc096ad94921d45005ce87c505de554903be0e31f92f93c1defdb82c07ab84b3acd2d144b52bd9f075edcd78d1a8769ed9
@@ -6,9 +6,13 @@ module Mongoid
6
6
  def as_indexed_json
7
7
  serializable_hash.reject { |k, v| %w(_id c_at u_at created_at updated_at).include?(k) }
8
8
  end
9
+
10
+ def es_index?
11
+ true
12
+ end
9
13
 
10
14
  def es_update
11
- if destroyed?
15
+ if destroyed? || !es_index?
12
16
  self.class.es.remove_item(self)
13
17
  else
14
18
  self.class.es.index_item(self)
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Elasticsearch
3
- VERSION = "0.3.5"
3
+ VERSION = "0.3.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv