statesman-multi_state 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e02e616c095965e3fad74c6f27a75e597d65eb8e99a1c8187b4e2cda00ee425
|
4
|
+
data.tar.gz: 321abe74833cfdac0697fb28ea14dd9a048a160b63bdcc70584e6cb682dde709
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17ee64df5a52944f2f6d0b46ef5e1c24d3bd2fa33e5c4d6e52aaa9d82d963b7ad1a006aca710174b5f45bf13266765790fd7fe74e71984f725e08a6514845074
|
7
|
+
data.tar.gz: 19020e0939fa73505c30a3e6a252ad28a7cd735735f9c95eb07106adde3df6791c896054cf9e33b41a9d547a082857deaa1fc3157f303cb5300a185f2fd86f0f
|
@@ -10,7 +10,7 @@ module Statesman
|
|
10
10
|
|
11
11
|
class_methods do
|
12
12
|
def has_one_state_machine(field_name, state_machine_klass:, transition_klass:,
|
13
|
-
transition_name: transition_klass.to_s.underscore.
|
13
|
+
transition_name: transition_klass.to_s.demodulize.underscore.pluralize.to_sym, virtual_attribute_name: "#{field_name}_state_form",
|
14
14
|
transition_foreign_key: nil)
|
15
15
|
state_machine_name = "#{field_name}_state_machine"
|
16
16
|
|
@@ -83,9 +83,10 @@ module Statesman
|
|
83
83
|
if defined?(super)
|
84
84
|
super
|
85
85
|
else
|
86
|
-
save
|
87
|
-
|
88
|
-
|
86
|
+
save.tap do
|
87
|
+
@registered_callbacks.each(&:call)
|
88
|
+
@registered_callbacks = []
|
89
|
+
end
|
89
90
|
end
|
90
91
|
end
|
91
92
|
METHOD
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: statesman-multi_state
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chedli Bourguiba
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: rails
|
@@ -63,7 +62,6 @@ metadata:
|
|
63
62
|
homepage_uri: https://github.com/chaadow/statesman-multi_state
|
64
63
|
source_code_uri: https://github.com/chaadow/statesman-multi_state
|
65
64
|
changelog_uri: https://github.com/chaadow/statesman-multi_state/blob/master/CHANGELOG.md
|
66
|
-
post_install_message:
|
67
65
|
rdoc_options: []
|
68
66
|
require_paths:
|
69
67
|
- lib
|
@@ -78,8 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
76
|
- !ruby/object:Gem::Version
|
79
77
|
version: '0'
|
80
78
|
requirements: []
|
81
|
-
rubygems_version: 3.
|
82
|
-
signing_key:
|
79
|
+
rubygems_version: 3.6.7
|
83
80
|
specification_version: 4
|
84
81
|
summary: Rails/Statesman plugin that handle multiple state machines on the same model
|
85
82
|
through `has_one_state_machine` ActiveRecord macro
|