mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
Update Readme to include states_for_select method
This commit is contained in:
parent
64a133407d
commit
13d42d02ba
1 changed files with 4 additions and 0 deletions
|
@ -704,6 +704,10 @@ job.aasm.states(:permitted => true).map(&:name)
|
|||
# show all possible (triggerable) events (allowed by transitions)
|
||||
job.aasm.events.map(&:name)
|
||||
=> [:sleep]
|
||||
|
||||
# list states for select
|
||||
Job.aasm.states_for_select
|
||||
=> [["Sleeping", "sleeping"], ["Running", "running"], ["Cleaning", "cleaning"]]
|
||||
```
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue