RubyGems
npm
Organizations
Log in
Sign up
RubyGems
rails-trash
Versions diffs
1.1.0 → 1.1.1
rails-trash 1.1.0 → 1.1.1
Sign up to get
free
protection for your applications and to get access to all the features.
Files changed (2)
hide
show
data/lib/rails-trash.rb
+5
-1
metadata
+1
-1
data/lib/rails-trash.rb
CHANGED
@@ -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