paper_trail-active_record 1.0.0 → 1.0.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: 934cfc40b232a8284fdd96e5b6ee941bbcbf743cad7efc46615f1b41e1de7ec4
4
- data.tar.gz: 2a9ce631a65f989b558343f340b9fd56b1aed9d9cc421b3f10e2593d52de3d74
3
+ metadata.gz: 7eb43efab491ca147042d869e1c6cb393f93aeb0009b0d4cb07cbd2bf53a6f86
4
+ data.tar.gz: 2dbd8283253a607fafca24f701a3301370e68a297b268dfafb6860a695fc21c0
5
5
  SHA512:
6
- metadata.gz: cce01fc8714b7573a877c02f0c190559b466ce13c35168a9e77ed85d8286f412afb850a3fc1b70283e98295334fb6e2beffb2f4eba1b8d80dfd696bf94ff3898
7
- data.tar.gz: 16d19245089055b4697aa1de1046d64de445d555e1490e1468cd5a5d3a9ac03cf667989edf40863d0ecf8a5aa168f0b8c3162709d11f3954970627452aeed8b4
6
+ metadata.gz: 1d51610af16be9fe0c8963194c41e218fa5a1dd3916c22d15e7c7fea6a2e137f3d87da649f7cee471b65267c195150ca5bdaed4d32b35624b5f05d2d4632b718
7
+ data.tar.gz: 64ada7b475c0594cff53556e7c703fbf07a91af9106bb0d3e504ef9a22729427ce753f65a30a99bdca6ac05e3c06c278b6d6caf7a6c29d447dab5f5028c2f188
@@ -52,13 +52,13 @@ module OrDeleted
52
52
 
53
53
  klass =
54
54
  if reflection.polymorphic?
55
- public_send(reflection.foreign_type).constantize
55
+ public_send(reflection.foreign_type)&.constantize
56
56
  else
57
57
  reflection.klass
58
58
  end
59
59
  id = public_send(reflection.foreign_key)
60
60
 
61
- klass.find_deleted(id)
61
+ klass&.find_deleted(id) if id
62
62
  end
63
63
  end)
64
64
 
@@ -1,7 +1,7 @@
1
1
  module PaperTrail
2
2
  module ActiveRecordExt
3
3
  def self.version
4
- "1.0.0"
4
+ "1.0.1"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paper_trail-active_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Rick
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-27 00:00:00.000000000 Z
11
+ date: 2022-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paper_trail