libis-workflow-mongoid 2.0.beta.16 → 2.0.beta.17
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c05de5dcf23591d951dd2b8d6957c0a2adbce7f
|
4
|
+
data.tar.gz: f89071487ece5fbe8c9ff3b5e5c468f763ccddd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5c2cda48ce95171fa3c0e835604889e2c3224f8339aeeacc8c93fc33a76a2f375f611961819cfb81e5fc6947206ab2cc9e7d955a365784d3fa08274b6d90a07
|
7
|
+
data.tar.gz: d2a8444c712de8b69fd0c94cc6f0edee36c9931ab3b17b6bb1f2867974eff7c3195ba6ee618106d73cb3234abd6a57de041d5ec5fbeb7a05161e976053abf061
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Libis
|
4
4
|
module Workflow
|
5
5
|
module Mongoid
|
6
|
-
VERSION = '2.0.beta.
|
6
|
+
VERSION = '2.0.beta.17' unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
|
7
7
|
end
|
8
8
|
end
|
9
9
|
end
|
@@ -74,6 +74,16 @@ module Libis
|
|
74
74
|
self.logs.status_log.all || []
|
75
75
|
end
|
76
76
|
|
77
|
+
def add_item(item)
|
78
|
+
old_parent = item.parent
|
79
|
+
super
|
80
|
+
if old_parent
|
81
|
+
old_parent.items.delete(item)
|
82
|
+
old_parent.save!
|
83
|
+
end
|
84
|
+
self
|
85
|
+
end
|
86
|
+
|
77
87
|
def get_items
|
78
88
|
self.items.to_a
|
79
89
|
end
|