after_commit 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/after_commit.rb +1 -0
- data/lib/after_commit/test_bypass.rb +4 -5
- metadata +1 -1
data/lib/after_commit.rb
CHANGED
@@ -7,25 +7,24 @@
|
|
7
7
|
module AfterCommit::TestBypass
|
8
8
|
def self.included(klass)
|
9
9
|
klass.class_eval do
|
10
|
-
[:
|
10
|
+
[:add_committed_record_on_create, :add_committed_record_on_update, :add_committed_record_on_destroy].each do |method|
|
11
11
|
remove_method(method)
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
def add_committed_record
|
17
|
-
after_commit_callback
|
18
|
-
end
|
19
|
-
|
20
16
|
def add_committed_record_on_create
|
17
|
+
after_commit_callback
|
21
18
|
after_commit_on_create_callback
|
22
19
|
end
|
23
20
|
|
24
21
|
def add_committed_record_on_update
|
22
|
+
after_commit_callback
|
25
23
|
after_commit_on_update_callback
|
26
24
|
end
|
27
25
|
|
28
26
|
def add_committed_record_on_destroy
|
27
|
+
after_commit_callback
|
29
28
|
after_commit_on_destroy_callback
|
30
29
|
end
|
31
30
|
end
|