delayed_after_commit 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/delayed_after_commit.rb +2 -2
- data/lib/delayed_after_commit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 505deeff3ceb5cbe3e84a6ce674673877cfcc3d7
|
4
|
+
data.tar.gz: 9fc961563f97c2192353fa2e6f7dcbb3cb34076d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 149a3108f3434350a7ca566385be95788c2e4d4eb62454770efadef9e3f13349ff904042fe3a5ed60b9025f62673a084158e2b5a448309f44dac49016c28edd2
|
7
|
+
data.tar.gz: b95789a1e63856354cd6673508685653c8178f60afe202e69499e35fd29da29c29d7d760f6c21e310d5f1b98a06d94d3479d0e854165067dfe4240e7a071e01a
|
data/README.md
CHANGED
@@ -30,8 +30,8 @@ Or install it yourself as:
|
|
30
30
|
|
31
31
|
class User < ActiveRecord::Base
|
32
32
|
include DelayedAfterCommit
|
33
|
-
|
34
|
-
|
33
|
+
delayed_after_update :hi_ive_been_updated
|
34
|
+
delayed_after_create :hi_im_new_around_here
|
35
35
|
|
36
36
|
def hi_ive_been_updated
|
37
37
|
puts "Hi - I've been updated"
|
data/lib/delayed_after_commit.rb
CHANGED
@@ -11,11 +11,11 @@ module DelayedAfterCommit
|
|
11
11
|
obj.send(method)
|
12
12
|
end
|
13
13
|
|
14
|
-
def
|
14
|
+
def delayed_after_create(method, &block)
|
15
15
|
delayed_after_commit(method, on: :create, &block)
|
16
16
|
end
|
17
17
|
|
18
|
-
def
|
18
|
+
def delayed_after_update(method, &block)
|
19
19
|
delayed_after_commit(method, on: :update, &block)
|
20
20
|
end
|
21
21
|
|