effective_trash 0.4.4 → 0.4.5

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: d3502b38f4aa2cc6d54549502a78825dc2cb6001e5e6ffff7f77700829425d04
4
- data.tar.gz: 708c7becb68d60bfd469599780abeeccfa73fa7e15585dc005a8e9f92f91b90b
3
+ metadata.gz: 1ac79bdbe58cfb775094f46dcb4c52196a9abce2fa0d1eed90cb90d6d5a4fa12
4
+ data.tar.gz: 497ddf1290194a279b721d28c5580c0c3ea14d2fe8374774d2cd482676e63dad
5
5
  SHA512:
6
- metadata.gz: 59ffc3c60dcca824cad433d876a87ccb9fcbcd33b2c93d2b260b7003d9ea5a97d6876f99317a52966e2c62b200ff750c04ac32368a4ea5edc984e972a4cbfc3c
7
- data.tar.gz: 427977e12249a3f2fb6a9b8f0d586a38d93ada9cb178054f99ebc90b4336c5c6cd273e73c61dc859692834168d5dbb6847c131d2775d6234827b0786956be229
6
+ metadata.gz: aaf122d97062b5bda53653fc88079f907fc4931412b22f42666cf34f8953aa0c10999cbbae23dbca0314bc015d8fb6d6d00a102d584993da0b8cfabdbaa111b5
7
+ data.tar.gz: 8536e72b5b8ace2ce1d66fcc6511e7fd2c163d28978d23bc54203701edb842483c9a293d2a7ed154c734226e1d0f167a829066e1cf27381ca71a983adc64a553
@@ -3,7 +3,7 @@ module Effective
3
3
  self.table_name = EffectiveTrash.trash_table_name.to_s
4
4
 
5
5
  belongs_to :trashed, polymorphic: true # The original item type and id. Note that this object will never exist as it's deleted.
6
- belongs_to :user # The user that destroyed the original resource
6
+ belongs_to :user, optional: true # The user that destroyed the original resource
7
7
 
8
8
  # Attributes
9
9
  # trashed_type :string
@@ -28,7 +28,7 @@ module Effective
28
28
  end
29
29
 
30
30
  def details
31
- self[:details] || {}
31
+ Hash(self[:details])
32
32
  end
33
33
 
34
34
  def to_object
@@ -1,3 +1,3 @@
1
1
  module EffectiveTrash
2
- VERSION = '0.4.4'.freeze
2
+ VERSION = '0.4.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_trash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-28 00:00:00.000000000 Z
11
+ date: 2024-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  requirements: []
119
- rubygems_version: 3.4.10
119
+ rubygems_version: 3.5.6
120
120
  signing_key:
121
121
  specification_version: 4
122
122
  summary: Trash and Restore any Active Record object.