mm_soft_deleted 0.0.2 → 0.0.3

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: 2cedeb19982d4aaf9e243a4827b2f441136b6872
4
- data.tar.gz: 9f99c53a1dd1e5340dcea8f9877d5f5568356877
3
+ metadata.gz: 7311e0a2d733aa695afdd8ed3af726c57b87bc6f
4
+ data.tar.gz: 2b85fe3368327385902b6d5bf98346e9f3573c0c
5
5
  SHA512:
6
- metadata.gz: ee800caacd88f784b2fd18d0fff2cda58063f5a6de79e5570ab300496fe90550eb8ae23e045a5bd92c5377f1780931f9d4c8fe0ca989750192afe03d62172e70
7
- data.tar.gz: 4cc2f05716f41f7427c7af016b1cfe2822eb898a29d0e71c030bb890fa536ff2dbacff4ab061c3a10e6d799df52c9527bbfb71dcc1eccae6badfc41835f16075
6
+ metadata.gz: 061fc738ad7f0b39d61865a5ac677f92b658ef7e53d94ba737e6389de13c278dfb43892b41deb25ce54c93cba3e27be8b44c5f4897581358c12ad0a25293f592
7
+ data.tar.gz: 7e36980894e8b26211b0000c5e8110a9a4db0288b537315f0b1d5d38e2cbe88b4d24dc8220f69cd904da9f58717c3ff6169514898627b07563a3baa7752025bf
@@ -22,7 +22,13 @@ module MongoMapper::SoftDeleted
22
22
  mod.send(:include, MongoMapper::SoftDeleted::InstanceMethods)
23
23
 
24
24
  mod.after_destroy do
25
- soft_delete_destroy(self) if MongoMapper::SoftDeleted.enabled?
25
+ return true unless MongoMapper::SoftDeleted.enabled?
26
+ return true if @__soft_deleted_destroy_run
27
+
28
+ @__soft_deleted_destroy_run = true
29
+ soft_delete_destroy(self)
30
+
31
+ true
26
32
  end
27
33
  end
28
34
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mm_soft_deleted
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Taylor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-10 00:00:00.000000000 Z
11
+ date: 2016-10-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Soft delete records with mongo mapper
14
14
  email: scott@railsnewbie.com