immosquare-active-record-change-tracker 0.1.2 → 0.1.3
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5650120d8f436785ef6f502ee25c0aa62178f0ce17971abf2b094c8538812685
|
4
|
+
data.tar.gz: 423402a86f5e8934f620de94d8544e8f695057805d05b30c2415a5f3009166c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a10fa0b1d4312e9969ae3eb15ba36673b4e55cc773ac600453dd720d0699cb789109118a3da849255e740b81da55f6a8c6673c6f06f9de2c510b9f1b5cbd822
|
7
|
+
data.tar.gz: 2f6cd9da9e195174f20bfb12e4f1b43940b0399b2d00f500b665794948bd81e4dd8e32e6fd648c4ab532e2a986fdae2a6046ca5ed462d9ac26cdfe9e92faf8a8
|
@@ -13,7 +13,7 @@ module ImmosquareActiveRecordChangeTracker
|
|
13
13
|
## Can be improved with other gems like paranoia
|
14
14
|
##============================================================##
|
15
15
|
def kept_in_db
|
16
|
-
|
16
|
+
paranoid?
|
17
17
|
end
|
18
18
|
|
19
19
|
def track_active_record_changes(options = {}, &modifier_block)
|
@@ -58,6 +58,7 @@ module ImmosquareActiveRecordChangeTracker
|
|
58
58
|
##============================================================##
|
59
59
|
after_save(:save_change_history)
|
60
60
|
after_destroy(:delete_change_history)
|
61
|
+
after_real_destroy(:delete_all_change_histories) if paranoid?
|
61
62
|
end
|
62
63
|
end
|
63
64
|
|
@@ -65,6 +66,10 @@ module ImmosquareActiveRecordChangeTracker
|
|
65
66
|
private
|
66
67
|
|
67
68
|
|
69
|
+
def delete_all_change_histories
|
70
|
+
history_records.destroy_all
|
71
|
+
end
|
72
|
+
|
68
73
|
##============================================================##
|
69
74
|
## Stocker les changements après un create ou save ou update
|
70
75
|
##============================================================##
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: immosquare-active-record-change-tracker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- immosquare
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A gem to track changes on ActiveRecord models
|
14
14
|
email:
|