paranoid2 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/paranoid2/persistence.rb +2 -2
- data/lib/paranoid2/version.rb +1 -1
- metadata +4 -4
@@ -12,7 +12,7 @@ module Paranoid2
|
|
12
12
|
|
13
13
|
def delete(opts = {})
|
14
14
|
with_paranoid(opts) do
|
15
|
-
|
15
|
+
update_attribute(:deleted_at, Time.now) if !deleted? && persisted?
|
16
16
|
if paranoid_force
|
17
17
|
self.class.unscoped { super() }
|
18
18
|
else
|
@@ -24,7 +24,7 @@ module Paranoid2
|
|
24
24
|
def restore(opts={})
|
25
25
|
return if !destroyed?
|
26
26
|
|
27
|
-
|
27
|
+
update_attribute :deleted_at, nil
|
28
28
|
|
29
29
|
if opts.fetch(:associations) { true }
|
30
30
|
restore_associations
|
data/lib/paranoid2/version.rb
CHANGED
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: paranoid2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.
|
5
|
+
version: 1.1.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- yury
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -92,7 +92,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
92
92
|
- - ! '>='
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0'
|
95
|
-
hash:
|
95
|
+
hash: 2406579501986756191
|
96
96
|
segments:
|
97
97
|
- 0
|
98
98
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
- - ! '>='
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
|
-
hash:
|
104
|
+
hash: 2406579501986756191
|
105
105
|
segments:
|
106
106
|
- 0
|
107
107
|
requirements: []
|