libis-workflow-mongoid 2.0.beta.16 → 2.0.beta.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d427c4ff09694030b0dad280d5d749237102ea9f
4
- data.tar.gz: 6d8bdf12627c59cd6b298bd17d95126536a88156
3
+ metadata.gz: 8c05de5dcf23591d951dd2b8d6957c0a2adbce7f
4
+ data.tar.gz: f89071487ece5fbe8c9ff3b5e5c468f763ccddd7
5
5
  SHA512:
6
- metadata.gz: ea3a504f494f3baea4c80d7b72e4e5f65a2dbd91c12b95ff3201aba9c930e29a146e9c2be67ca1367ae01125f7675d6157c5d85ad5246abdbd2c74a76a2da74e
7
- data.tar.gz: 2ffa67e364a26482bf5c6a35aac6d18aa1c851161153577edd17c40a142d52c7fbe35c49000837359c457c37e4b427ccc052e7bd90134e69a0e239eabdb7ff16
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.16' unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libis-workflow-mongoid
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.beta.16
4
+ version: 2.0.beta.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kris Dekeyser