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: bdf4dad2fc3d9058dad099ef5dd9fffff4a668a4d53ba4fa883ec646c5208c62
4
- data.tar.gz: f395ee20c35136b578b73251de92ec388d389e3cc3f4cd3ee6147936645fa385
3
+ metadata.gz: 5650120d8f436785ef6f502ee25c0aa62178f0ce17971abf2b094c8538812685
4
+ data.tar.gz: 423402a86f5e8934f620de94d8544e8f695057805d05b30c2415a5f3009166c8
5
5
  SHA512:
6
- metadata.gz: 5bebb9b4525197085eceb6aab6d3de99d039ed77223a8fb98a3224ddca314c626134688b886e91d8e8445574ef67f2a50add1339adafac2e34582493655fd48a
7
- data.tar.gz: 89aa7f67896f3a7ae5b05268786b5fa6e79169223bbc06165829df8e65259827ad5f4cb4b3d2e9966e2f2582eb6ab786c7d7cc6800b5f6fba73d7ea3e80549f9
6
+ metadata.gz: 9a10fa0b1d4312e9969ae3eb15ba36673b4e55cc773ac600453dd720d0699cb789109118a3da849255e740b81da55f6a8c6673c6f06f9de2c510b9f1b5cbd822
7
+ data.tar.gz: 2f6cd9da9e195174f20bfb12e4f1b43940b0399b2d00f500b665794948bd81e4dd8e32e6fd648c4ab532e2a986fdae2a6046ca5ed462d9ac26cdfe9e92faf8a8
@@ -1,3 +1,3 @@
1
1
  module ImmosquareActiveRecordChangeTracker
2
- VERSION = "0.1.2".freeze
2
+ VERSION = "0.1.3".freeze
3
3
  end
@@ -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
- respond_to?(:paranoia_column)
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.2
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-14 00:00:00.000000000 Z
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: