active_record_segment 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/active_record_segment/segmentable.rb +3 -5
- data/lib/active_record_segment/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cbb6283db4e4fcc73300220872e9f2561ee8b35b2de49ff402fe830e6391f48
|
4
|
+
data.tar.gz: b32b3bd2f8544a4bb74d892e281462c37c9eb0c468a2a46fa7513bebb776a524
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30faa4d86732fb97f059e89e4b887fa53cc1d3b605a0fee613b4e13a9241f8cb4f5583aaff0b7cc765b02947e2905ee4bf5c86eccdfb7797b1dcec8fa8e69e3a
|
7
|
+
data.tar.gz: 6a2bbb98f4db6ace24147b52c225c5998fe592b32d05bbc49fbf848662903132e6620ca26dce63af9b29fb8ee0e4fb0e327f4a65f3a5c59e247f1b5d3a310a36
|
@@ -39,16 +39,14 @@ module ActiveRecordSegment
|
|
39
39
|
user = nil
|
40
40
|
company = nil
|
41
41
|
end
|
42
|
-
return false if user.nil?
|
43
|
-
return false if company.nil?
|
44
42
|
|
45
43
|
event = {
|
46
44
|
event: 'Audit Logs',
|
47
|
-
user_id: user
|
45
|
+
user_id: user&.id || "anonymousUser",
|
48
46
|
timestamp: Time.now,
|
49
47
|
properties: {
|
50
|
-
source_user_id: user
|
51
|
-
source_company_id: company
|
48
|
+
source_user_id: user&.id || "anonymousUser",
|
49
|
+
source_company_id: company&.id,
|
52
50
|
action: options[:action],
|
53
51
|
table_name: self.class.table_name,
|
54
52
|
table_id: self.id,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_segment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Workstream.is
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|