delay_henka 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/delay_henka/scheduled_change.rb +3 -3
- data/lib/delay_henka/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb75d752ce445a7666cf10ee57afa65cf5db7921
|
4
|
+
data.tar.gz: 1c2878c9807c1481e716375936692b6d4eb73d09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e94b1d649d511e4cf95b87d773f54ac192dbc0c913328dfa55261977a5d3abe404c098d9afdf7fab76e88c97ca7221d66c66423bd887cf7d82d4da5d4b615eda
|
7
|
+
data.tar.gz: 8a8188f64a2a07b5f1a0e65de30e5e06a80b49a79df6b167898bc55fd12930fcdd040facad07778aeca6b1c14626bfe11c14cd99eb34a8bc488d6f5ffd75ad95
|
@@ -18,10 +18,10 @@ 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)
|
22
21
|
cleaned_new_val = cleanup_val(new_val)
|
23
|
-
|
24
|
-
|
22
|
+
record.public_send("#{attribute}=", cleaned_new_val)
|
23
|
+
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
25
|
end
|
26
26
|
end
|
27
27
|
|
data/lib/delay_henka/version.rb
CHANGED
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.
|
4
|
+
version: 0.2.3
|
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-
|
11
|
+
date: 2019-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|