wisper-active_tracker 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wisper/active_tracker/tracker.rb +13 -9
- data/lib/wisper/active_tracker/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9653554aee66849fa191fad424789ddbbe068c4
|
4
|
+
data.tar.gz: 42932ac432b075229333bee3af85c146c6fabd83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a4f05999713768f8addc8e04b0dfc837d580ff4f8eeb52aa09ee377a627e21d8145ed944ef0c1bccf0e1e43a2bf314b717d1f9fc92ee5d5b1dc4093b13de701
|
7
|
+
data.tar.gz: 25f9d244cb7abec1712a040d5b65c99ea1528fa26e725ace37680f44901fc65b90600a2c676e6ef35724c128412e1d5817d28b6b21936fa53952cee30bb839be
|
@@ -23,29 +23,33 @@ module Wisper
|
|
23
23
|
|
24
24
|
def __track_after_validation_broadcast
|
25
25
|
action = new_record? ? 'create' : 'update'
|
26
|
-
broadcast("#{action}_#{self.class.model_name.param_key}_failed",
|
26
|
+
broadcast("#{action}_#{self.class.model_name.param_key}_failed", __tracker_args_broadcast) unless errors.empty?
|
27
27
|
end
|
28
28
|
|
29
29
|
def __track_after_create_broadcast
|
30
|
-
broadcast(:after_create,
|
31
|
-
broadcast("create_#{self.class.model_name.param_key}_successful",
|
30
|
+
broadcast(:after_create, __tracker_args_broadcast)
|
31
|
+
broadcast("create_#{self.class.model_name.param_key}_successful", __tracker_args_broadcast)
|
32
32
|
end
|
33
33
|
|
34
34
|
def __track_after_update_broadcast
|
35
|
-
broadcast(:after_update,
|
36
|
-
broadcast("update_#{self.class.model_name.param_key}_successful",
|
35
|
+
broadcast(:after_update, __tracker_args_broadcast)
|
36
|
+
broadcast("update_#{self.class.model_name.param_key}_successful", __tracker_args_broadcast)
|
37
37
|
end
|
38
38
|
|
39
39
|
def __track_after_destroy_broadcast
|
40
|
-
broadcast(:after_destroy,
|
41
|
-
broadcast("destroy_#{self.class.model_name.param_key}_successful",
|
40
|
+
broadcast(:after_destroy, __tracker_args_broadcast)
|
41
|
+
broadcast("destroy_#{self.class.model_name.param_key}_successful", __tracker_args_broadcast)
|
42
42
|
end
|
43
43
|
|
44
44
|
def __track_after_rollback_broadcast
|
45
|
-
broadcast(:after_rollback,
|
45
|
+
broadcast(:after_rollback, __tracker_args_broadcast)
|
46
46
|
end
|
47
47
|
|
48
|
-
def
|
48
|
+
def __track_before_destroy_broadcast
|
49
|
+
broadcast(:before_destroy, __tracker_args_broadcast)
|
50
|
+
end
|
51
|
+
|
52
|
+
def __tracker_args_broadcast
|
49
53
|
args = {}
|
50
54
|
|
51
55
|
args[:tenant] = Apartment::Tenant.current if defined?(Apartment)
|