state_machines-after_transition_commit 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/lib/state_machines/after_transition_commit.rb +2 -2
- data/lib/state_machines/after_transition_commit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fc2a4733434549e3c138e3fd6e443d51ae0dadad4608da97c6c8f81ade8d7c7
|
4
|
+
data.tar.gz: 56187a1602173c09cd9e0aa520d593b7aa29d103113818185e503955066f20b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c490a7acec41201a4c113a3fef2da071639347fadc8f4cc9efb330a75c91b16fd21aad644ac53265641ca997952766a1389d99b9396703ad4ddf9a5501107e38
|
7
|
+
data.tar.gz: d2308912548a4322d939576c51a3bb05cabb8396bcc7d3ae8eb96e1682462a77b01baba5a2514298d8f527052f0db2e88cda7b6024b0a6a51074332c6d1c8e69
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -16,9 +16,9 @@ module StateMachines
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
def after_transition_commit(
|
19
|
+
def after_transition_commit(*args, &after_transistion_block)
|
20
20
|
state_machine = self
|
21
|
-
state_machine.after_transition(
|
21
|
+
state_machine.after_transition(*args) do |object, _transition|
|
22
22
|
blocks_to_call_after_commit = object.instance_variable_get(:@blocks_to_call_after_commit) || []
|
23
23
|
blocks_to_call_after_commit << after_transistion_block
|
24
24
|
object.instance_variable_set(:@blocks_to_call_after_commit, blocks_to_call_after_commit)
|