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 +4 -4
- data/lib/mongo_mapper/soft_deleted.rb +7 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7311e0a2d733aa695afdd8ed3af726c57b87bc6f
|
4
|
+
data.tar.gz: 2b85fe3368327385902b6d5bf98346e9f3573c0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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.
|
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-
|
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
|