delay_henka 0.2.1 → 0.2.2

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: a0d90483609b5a69d7f76de25d0976eb11c69d78
4
- data.tar.gz: '09c3b7f7f8091320a23878548af80f89ca76fcdf'
3
+ metadata.gz: 3005f11e612f403e705bf989998e6aad752c88f5
4
+ data.tar.gz: fac7c914ed39c4009311bcd63293e9fc11a3fce8
5
5
  SHA512:
6
- metadata.gz: 945923c8797038814cb1c9ceb37f8d9da2a554a85060a79abfcbc5013e319868b69d134cfdeb64b0e3b57e195521bc2668135460c020b148a4b165d54f7c7c90
7
- data.tar.gz: f1a9925b8c68c8f0a548e88514fc9deb12e32e7f3f81233ed0840efb43ea10e96423e3441e15644dce70ce5da3928bd0295403190d09052883e8da9e507cbcc5
6
+ metadata.gz: 1d6aadd6f2ddecbd3abe95d74783f3947ec363d932988b7c9d16ef951423ea6ed97a2241b354d334c12dfbbeae1ddb43291c05eb5e4e7330ee071a71912f66d6
7
+ data.tar.gz: 0f1afcc612f302076eedefafd2f38c18bdf458d4fdcbbc71d3e688755579582eb26548a87d022da965122e538ac9c33b1c8de446a4e816a404a9f106a4a6f270
@@ -26,10 +26,14 @@ module DelayHenka
26
26
  end
27
27
 
28
28
  def apply_change
29
- if changeable.update(attribute_name => new_value)
30
- update(state: STATES[:COMPLETED])
29
+ if changeable
30
+ if changeable.update(attribute_name => new_value)
31
+ update(state: STATES[:COMPLETED])
32
+ else
33
+ update(state: STATES[:ERRORED], error_message: changeable.errors.full_messages.join(', '))
34
+ end
31
35
  else
32
- update(state: STATES[:ERRORED], error_message: changeable.errors.full_messages.join(', '))
36
+ update(state: STATES[:ERRORED], error_message: 'Target record cannot be found')
33
37
  end
34
38
  end
35
39
 
@@ -1,3 +1,3 @@
1
1
  module DelayHenka
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delay_henka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - zino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-02 00:00:00.000000000 Z
11
+ date: 2019-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails