soft_deletion 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/soft_deletion/dependency.rb +1 -1
- data/lib/soft_deletion/version.rb +1 -1
- data/spec/soft_deletion_spec.rb +9 -1
- metadata +5 -5
data/Gemfile.lock
CHANGED
data/spec/soft_deletion_spec.rb
CHANGED
@@ -311,7 +311,7 @@ describe SoftDeletion do
|
|
311
311
|
end
|
312
312
|
|
313
313
|
it "does not fail if dependent associations are not deleted" do
|
314
|
-
@forum.soft_undelete!
|
314
|
+
@forum.reload.soft_undelete!
|
315
315
|
undelete!
|
316
316
|
@forum.reload
|
317
317
|
@forum.should_not be_deleted
|
@@ -346,6 +346,14 @@ describe SoftDeletion do
|
|
346
346
|
forum.should_not be_deleted # just did an update_all
|
347
347
|
Forum.find(forum.id).should be_deleted
|
348
348
|
end
|
349
|
+
|
350
|
+
it "custom sql to delete all" do
|
351
|
+
category = DDACategory.create!
|
352
|
+
forum = category.forums.create!
|
353
|
+
DDACategory.should_receive(:mark_as_soft_deleted_sql).and_return "fooo"
|
354
|
+
category.forums.should_receive(:update_all).with("fooo")
|
355
|
+
category.soft_delete!
|
356
|
+
end
|
349
357
|
end
|
350
358
|
|
351
359
|
context "a soft-deleted has-many category that defaults dependent forum references on delete" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soft_deletion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-11-
|
12
|
+
date: 2013-11-13 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email: michael@grosser.it
|
@@ -54,7 +54,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
54
54
|
version: '0'
|
55
55
|
segments:
|
56
56
|
- 0
|
57
|
-
hash:
|
57
|
+
hash: 4555391312656709535
|
58
58
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
59
59
|
none: false
|
60
60
|
requirements:
|
@@ -63,10 +63,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
63
63
|
version: '0'
|
64
64
|
segments:
|
65
65
|
- 0
|
66
|
-
hash:
|
66
|
+
hash: 4555391312656709535
|
67
67
|
requirements: []
|
68
68
|
rubyforge_project:
|
69
|
-
rubygems_version: 1.8.
|
69
|
+
rubygems_version: 1.8.23
|
70
70
|
signing_key:
|
71
71
|
specification_version: 3
|
72
72
|
summary: Explicit soft deletion for ActiveRecord via deleted_at and default scope.
|