effective_logging 1.10.13 → 1.10.14
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29f890fe99ddcca053f1bdc9fe22abb22e70ee8f
|
4
|
+
data.tar.gz: 10cd24499439b48b1aed1dcdc23c11a64e29c029
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83217d81e6044183117963b563b96d5d0ad9b59849bc2f8c81f5801773e6cfa38ebf5cbc45bb836455f15ff8fe7ae01f99a90743d2fd925ac28a325ace99c851
|
7
|
+
data.tar.gz: 6d9bd061e74e7ee63db8c46349c316782b3a638ba9be8539839629d688f3d1a45d163503262aab8dbcccb876b31b335b43b969729e1a838712a1d626d26672cc
|
@@ -20,7 +20,7 @@ module ActsAsLoggable
|
|
20
20
|
@acts_as_loggable_new_record = new_record?
|
21
21
|
|
22
22
|
unless @acts_as_loggable_new_record
|
23
|
-
@acts_as_loggable_update_record = ::
|
23
|
+
@acts_as_loggable_update_record = ::ActiveRecordLogger.new(self, log_changes_options).execute!
|
24
24
|
end
|
25
25
|
|
26
26
|
block.call
|
@@ -29,15 +29,15 @@ module ActsAsLoggable
|
|
29
29
|
|
30
30
|
before_destroy do
|
31
31
|
@acts_as_loggable_destroy_record = true
|
32
|
-
::
|
32
|
+
::ActiveRecordLogger.new(self, log_changes_options).destroyed!
|
33
33
|
true
|
34
34
|
end
|
35
35
|
|
36
36
|
after_commit do
|
37
37
|
if @acts_as_loggable_new_record
|
38
|
-
::
|
38
|
+
::ActiveRecordLogger.new(self, log_changes_options).created!
|
39
39
|
elsif !@acts_as_loggable_destroy_record && @acts_as_loggable_update_record
|
40
|
-
::
|
40
|
+
::ActiveRecordLogger.new(self, log_changes_options).updated!
|
41
41
|
end
|
42
42
|
|
43
43
|
true
|
@@ -75,7 +75,7 @@ module EffectiveLogging
|
|
75
75
|
title = association.name.to_s.singularize.titleize
|
76
76
|
|
77
77
|
Array(object.send(association.name)).each_with_index do |child, index|
|
78
|
-
@logged = true if ::
|
78
|
+
@logged = true if ::ActiveRecordLogger.new(child, options.merge(logger: logger, depth: depth+1, prefix: "#{title} #{index} - #{child} - ")).execute!
|
79
79
|
end
|
80
80
|
end
|
81
81
|
end
|