rails-trash 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/rails-trash.rb +5 -1
  2. metadata +1 -1
@@ -26,8 +26,12 @@ module Rails
26
26
  unscoped.where(deleted_at.not_eq(nil))
27
27
  end
28
28
 
29
+ def find_in_trash(id)
30
+ deleted.find(id)
31
+ end
32
+
29
33
  def restore(id)
30
- deleted.find(id).restore
34
+ find_in_trash(id).restore
31
35
  end
32
36
 
33
37
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rails-trash
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.1.0
5
+ version: 1.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Francesc Esplugas