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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f5e5d78658c86749a582b5a76969cd3495d098900ca93fb07a8053013d1a0ab
4
- data.tar.gz: 613ce4acfa9c9f1bcefed868eb895da58c3e3b0733fb8f9b16af35feb0a538ee
3
+ metadata.gz: 4cbb6283db4e4fcc73300220872e9f2561ee8b35b2de49ff402fe830e6391f48
4
+ data.tar.gz: b32b3bd2f8544a4bb74d892e281462c37c9eb0c468a2a46fa7513bebb776a524
5
5
  SHA512:
6
- metadata.gz: 62c88abb718cabdc824709a7ce9c9d297a0460c4735846aab5aec992eed13993823ea402734a766d232cbe0c05f55c1a2d3ec562c5d5c13680d6818f5fb0d648
7
- data.tar.gz: 194e05de0f1937b2f688d5c80401d466a90828adb2ea2391234ef0699ff86f4a8813914b1e2a26fa68f241d500b128fdf22e8c41fb3298addcc548b1d4003106
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.id,
45
+ user_id: user&.id || "anonymousUser",
48
46
  timestamp: Time.now,
49
47
  properties: {
50
- source_user_id: user.id,
51
- source_company_id: company.id,
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,
@@ -1,3 +1,3 @@
1
1
  module ActiveRecordSegment
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-13 00:00:00.000000000 Z
11
+ date: 2019-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord