paper_trail 10.0.0 → 10.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/paper_trail/config.rb +15 -3
- data/lib/paper_trail/version_number.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47c38caa07b2338ea8be0891289d04d2028487d81a4897b1cda2fb6ca2dcc7b1
|
4
|
+
data.tar.gz: 266c0c65f7c34c4d8be8ee698c605a4e887b4954005a16f074aa50da6c721c42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d9c17c2548902f41d6872dd97cd29cbce9db1793f5e71790d094f93c3287e32f2142429b30d808ee6370b88b84d4b8d5d6df30da487de2ef89c323375a392e9
|
7
|
+
data.tar.gz: ff8e7415e8b4fbc2928140d746aef3c103df47d591a139478441e9e1878b1cb90eee05d7b7eb38dbaa33c48126e9f1bc9662f1113c924b069a892da2dc0e429f
|
data/lib/paper_trail/config.rb
CHANGED
@@ -11,7 +11,10 @@ module PaperTrail
|
|
11
11
|
|
12
12
|
E_PT_AT_REMOVED = <<-EOS.squish
|
13
13
|
Association Tracking for PaperTrail has been extracted to a seperate gem.
|
14
|
-
|
14
|
+
To use it, please add `paper_trail-association_tracking` to your Gemfile.
|
15
|
+
If you don't use it (most people don't, that's the default) and you set
|
16
|
+
`track_associations = false` somewhere (probably a rails initializer) you
|
17
|
+
can remove that line now.
|
15
18
|
EOS
|
16
19
|
|
17
20
|
attr_accessor(
|
@@ -47,10 +50,19 @@ module PaperTrail
|
|
47
50
|
# because there is no known use case where someone would want to rescue
|
48
51
|
# this. If we think of such a use case in the future we can revisit this
|
49
52
|
# decision.
|
50
|
-
|
51
|
-
|
53
|
+
#
|
54
|
+
# @override If PT-AT is `require`d, it will replace this method with its
|
55
|
+
# own implementation.
|
56
|
+
def track_associations=(value)
|
57
|
+
if value
|
58
|
+
raise E_PT_AT_REMOVED
|
59
|
+
else
|
60
|
+
::Kernel.warn(E_PT_AT_REMOVED)
|
61
|
+
end
|
52
62
|
end
|
53
63
|
|
64
|
+
# @override If PT-AT is `require`d, it will replace this method with its
|
65
|
+
# own implementation.
|
54
66
|
def track_associations?
|
55
67
|
raise E_PT_AT_REMOVED
|
56
68
|
end
|