naranya_ecm-sdk 0.0.29 → 0.0.30

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: 43a17f984bc77a91ab6f48708316247507c6998d
4
- data.tar.gz: 938b9aa5bc94cb567bd40df4df89491068f831cd
3
+ metadata.gz: ef52f660e12d9616de3d74f068dfa1cae6bb580f
4
+ data.tar.gz: 4e0f764bca050029c135a74ccbefce484dbfd794
5
5
  SHA512:
6
- metadata.gz: 04148763fe680ec57f5927a6407ada9c28fa1919ea1524c7120a20f72dbe6ef6f934e2c259e5c2add795249100c62c725e43b576d5f3a8a79a028c645bfe0225
7
- data.tar.gz: ced5f82fd6da50e743e95f82c56d38a812022adaf2ac6699d47a6c35a00a15fd7dbd93ef82519edd9abcfaa5e7ea936939a7ede0bd71cdc3af67d7057e9c98ef
6
+ metadata.gz: 48ed78c824ae239e589085eb99778e03a8443a34ded280d56f4fe6f55324c85cf52e9017b5ff1dd5d5bfaaf2ea48fee61463f60bff3e98d36f6dc36d80b08a58
7
+ data.tar.gz: a8d9213a06ade35a93d84c54e7fddcbe81d5c7d99cac7acd4ade4d695bc55301da210d300e657a7db358e00ea9f106712918c283ae7e340cee47f1f18eb2bf77
@@ -1,3 +1,3 @@
1
1
  module NaranyaEcm
2
- VERSION = "0.0.29"
2
+ VERSION = "0.0.30"
3
3
  end
@@ -8,6 +8,11 @@ module NaranyaEcm::Rest
8
8
  define_model_callbacks :validation, :create, :update, :save, :destroy
9
9
  end
10
10
 
11
+ def touch
12
+ @is_touch = true
13
+ self.update
14
+ end
15
+
11
16
  def save
12
17
  run_callbacks :save do
13
18
  @previously_changed = changes
@@ -84,9 +89,14 @@ module NaranyaEcm::Rest
84
89
 
85
90
  def update
86
91
  run_callbacks :update do
87
- attributes_to_save = self.changes.dup
88
- attributes_to_save.each do |key, val|
89
- attributes_to_save[key] = val.last
92
+
93
+ unless @is_touch
94
+ attributes_to_save = self.changes.dup
95
+ attributes_to_save.each do |key, val|
96
+ attributes_to_save[key] = val.last
97
+ end
98
+ else
99
+ attributes_to_save = self.attributes.reject { |k,v| k == 'lifecycle_state' || v.blank? }
90
100
  end
91
101
 
92
102
  attributes_to_save.merge! off_band_changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: naranya_ecm-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.29
4
+ version: 0.0.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Quintanilla