delay_henka 0.2.3 → 0.2.4

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: eb75d752ce445a7666cf10ee57afa65cf5db7921
4
- data.tar.gz: 1c2878c9807c1481e716375936692b6d4eb73d09
3
+ metadata.gz: a9dc7cc926b1cce96ff3d2d7d5b2cbc17e05d92d
4
+ data.tar.gz: 84415334ddc990bdd629f1e75a546ba6d5b770de
5
5
  SHA512:
6
- metadata.gz: e94b1d649d511e4cf95b87d773f54ac192dbc0c913328dfa55261977a5d3abe404c098d9afdf7fab76e88c97ca7221d66c66423bd887cf7d82d4da5d4b615eda
7
- data.tar.gz: 8a8188f64a2a07b5f1a0e65de30e5e06a80b49a79df6b167898bc55fd12930fcdd040facad07778aeca6b1c14626bfe11c14cd99eb34a8bc488d6f5ffd75ad95
6
+ metadata.gz: b6c3c885759872583eda50b5ae942f5c828b17fcd864363fc59466e519fe0385ff418cc2a9e38ccc629460e6262a6f991796ed49ca13ddfde38cdf27e1805a86
7
+ data.tar.gz: b41d6278d9c2374b0a587406ea9bd4b3caef9acbe5bab1ddce2b9c6afdf4e7d4a4febea3df216e016e4842d479dcc26262f6d1d1bc6de49cfddae266581132d6
@@ -18,10 +18,11 @@ module DelayHenka
18
18
 
19
19
  def self.schedule(record:, changes:, by_id:)
20
20
  changes.each do |attribute, new_val|
21
+ old_val = record.public_send(attribute)
21
22
  cleaned_new_val = cleanup_val(new_val)
22
23
  record.public_send("#{attribute}=", cleaned_new_val)
23
24
  next unless record.public_send("#{attribute}_changed?")
24
- create!(changeable: record, submitted_by_id: by_id, attribute_name: attribute, old_value: record.public_send(attribute), new_value: cleaned_new_val)
25
+ create!(changeable: record, submitted_by_id: by_id, attribute_name: attribute, old_value: old_val, new_value: cleaned_new_val)
25
26
  end
26
27
  end
27
28
 
@@ -1,3 +1,3 @@
1
1
  module DelayHenka
2
- VERSION = '0.2.3'
2
+ VERSION = '0.2.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delay_henka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - zino