rails_admin_state 0.0.2 → 0.0.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
  SHA1:
3
- metadata.gz: 09ac44bc152c6cf090d4bd5d4a66f37d324a43f5
4
- data.tar.gz: b37490a19cd089b568357d88be6bc94214bc9604
3
+ metadata.gz: 32f2f60ff85cb1837ba52a227a50f0390e5357fb
4
+ data.tar.gz: 5ec0c96687d835da5467506428cc5a2629c197bf
5
5
  SHA512:
6
- metadata.gz: ae203b672542fb7304d5a5b7fbb4aa13b1bf414aa80e4939e734756a00d2bcbf04385fc5f3d8863ff6ff173c64c73e8ead9100a950e09c94f66ef0fcb9d490b3
7
- data.tar.gz: 28955b156fe2892008582a237c5e59b43509087bc1a63afbc88922fbdc1a4c2f6b3928a2e06369ab19767b9f4021a85bd3ce42ead839db20fe61129f378fe49f
6
+ metadata.gz: 3bc1957d9d146fd029b7a854c08ea1c5efb71f838ce62109fe7ea8ed08a2399c073b6d745edfab90f0f5e1790a23c2fe2567d6d5636566d68e17f8450a2aa265
7
+ data.tar.gz: 3446d4811e8032aa7eed455e6cfbf67cfba29a0a30aa344239ee89599ae8b8181ecbd0e18a49d163e7bf0d8e5a9643e2b8a96ad36effb0dd3811a405599e7f3c
data/README.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  Allows easily sending state_machine events to a model from Rails Admin
4
4
 
5
+ ## Screenshot
6
+
7
+ ![Rails Admin State Machine](https://rscx.ru/state.png)
8
+
9
+
5
10
  ## Installing
6
11
 
7
12
  Add this line to your application's Gemfile:
@@ -18,7 +23,6 @@ Or install it yourself as:
18
23
 
19
24
  ## Usage
20
25
 
21
-
22
26
  Add the set_state action:
23
27
 
24
28
  RailsAdmin.config do |config|
@@ -42,7 +46,7 @@ Make the field you need display as state_machine:
42
46
  ...
43
47
  end
44
48
 
45
- States and event names button classes and I18N:
49
+ ### States and event button/label custom classes:
46
50
 
47
51
  rails_admin do
48
52
  list do
@@ -56,7 +60,7 @@ States and event names button classes and I18N:
56
60
  })
57
61
  end
58
62
 
59
- i18n:
63
+ ### i18n (state and event names):
60
64
 
61
65
  Just as usual for state_machine, see:
62
66
 
@@ -16,7 +16,7 @@ module RailsAdmin
16
16
  register_instance_option :enum do
17
17
  enum = {}
18
18
  bindings[:object].class.state_machines[name.to_sym].states.each do |state|
19
- enum[state.name.to_s] = state.human_name
19
+ enum[state.human_name] = state.name.to_s
20
20
  end
21
21
  enum
22
22
  end
@@ -1,3 +1,3 @@
1
1
  module RailsAdminState
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_state
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv