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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7296ee2687e4995443c0faa8c5339a7d3d5e6086
4
- data.tar.gz: ee65bb860af95cb1c49abc09e8b8507ad77d18f5
3
+ metadata.gz: b9653554aee66849fa191fad424789ddbbe068c4
4
+ data.tar.gz: 42932ac432b075229333bee3af85c146c6fabd83
5
5
  SHA512:
6
- metadata.gz: f9758c4b02a34927db7a28f7fa8fb203fe7d20500391c4cd3f3408d1d6699aeb3ed8aa3fb37e90422fc642c16337b394a4c821194a029685c58e7340f449fe87
7
- data.tar.gz: fbbde614ed2fb29e1f0d57f9688bf1956c31a5d6fa9580b409617918299d35865bb72741a7f654b7c358a34a0ca73ae73dccfe061cc67309681a505dc0ec7111
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", args) unless errors.empty?
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, args)
31
- broadcast("create_#{self.class.model_name.param_key}_successful", args)
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, args)
36
- broadcast("update_#{self.class.model_name.param_key}_successful", args)
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, args)
41
- broadcast("destroy_#{self.class.model_name.param_key}_successful", args)
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, args)
45
+ broadcast(:after_rollback, __tracker_args_broadcast)
46
46
  end
47
47
 
48
- def args
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)
@@ -1,5 +1,5 @@
1
1
  module Wisper
2
2
  module ActiveTracker
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wisper-active_tracker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikko Kokkonen