hidden_hooks 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/lib/hidden_hooks/active_record.rb +24 -28
- data/lib/hidden_hooks/version.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: 88532a44bde6fdd20a6bcd02505060ec0abffd7fe55e815c3dd82a80d0be8819
|
4
|
+
data.tar.gz: 118bd2af55f7472686deaf3c93f9008b8d3fd820dab2082d6f032103f4f72583
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c7b53ac8c04c1b6d02dbd6af42d7c7d6e6d93a60faea4c23ffcbf615e6744d3626678b01a4d8d4c4b53846263e188aedfcfb39ea9e22d36c61ddbdb4c98fa9e
|
7
|
+
data.tar.gz: c81d8c1c686af906141279a02067a90a131445506a6c83c9fd967bd582b7868a6da54e780f08c1cba3d44da920ae8796e2be2a8c2b47611792647eb92da39434
|
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,21 @@
|
|
8
8
|
### Bug fixes
|
9
9
|
)-->
|
10
10
|
|
11
|
+
## 1.1.2 2025-01-28
|
12
|
+
|
13
|
+
### Bug fixes
|
14
|
+
|
15
|
+
- Fixed Active Record integration not setting callbacks for derived classes.
|
16
|
+
- Removed `after_*_commit` shortcut hooks.
|
17
|
+
- These aren't actually callbacks, but little more than wrappers for `after_commit` itself, so the method that gets called on the callback object is always `#after_commit`, causing some weird behaviors.
|
18
|
+
|
19
|
+
## 1.1.1 2025-01-28
|
20
|
+
|
21
|
+
### Bug fixes
|
22
|
+
|
23
|
+
- Removed `around_*` callbacks.
|
24
|
+
- The problem with `around_*` callbacks is that the callback needs to yield to the passed block otherwise the callback chain stops, so if there aren't hooks for a certain callback no one's yielding and the chain always stops.
|
25
|
+
|
11
26
|
## 1.1.0 2025-01-28
|
12
27
|
|
13
28
|
### New features
|
@@ -4,34 +4,30 @@ module HiddenHooks
|
|
4
4
|
module ActiveRecord
|
5
5
|
extend ActiveSupport::Concern
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
:before_update,
|
32
|
-
:before_validation
|
33
|
-
].each do |callback|
|
34
|
-
send callback, HiddenHooks[self], prepend: true
|
7
|
+
class_methods do
|
8
|
+
def inherited subclass
|
9
|
+
super
|
10
|
+
|
11
|
+
[
|
12
|
+
:after_commit,
|
13
|
+
:after_create,
|
14
|
+
:after_destroy,
|
15
|
+
:after_find,
|
16
|
+
:after_initialize,
|
17
|
+
:after_rollback,
|
18
|
+
:after_save,
|
19
|
+
:after_touch,
|
20
|
+
:after_update,
|
21
|
+
:after_validation,
|
22
|
+
:before_commit,
|
23
|
+
:before_create,
|
24
|
+
:before_destroy,
|
25
|
+
:before_save,
|
26
|
+
:before_update,
|
27
|
+
:before_validation
|
28
|
+
].each do |callback|
|
29
|
+
subclass.send callback, HiddenHooks[subclass], prepend: true
|
30
|
+
end
|
35
31
|
end
|
36
32
|
end
|
37
33
|
end
|
data/lib/hidden_hooks/version.rb
CHANGED