mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
Update Readme, add example to list permissible states
with guard parameter
This commit is contained in:
parent
d9420797e6
commit
86052bf8de
1 changed files with 3 additions and 0 deletions
|
@ -935,6 +935,9 @@ job.aasm.events(:reject => :sleep).map(&:name)
|
|||
# list states for select
|
||||
Job.aasm.states_for_select
|
||||
=> [["Sleeping", "sleeping"], ["Running", "running"], ["Cleaning", "cleaning"]]
|
||||
|
||||
# show permitted states with guard parameter
|
||||
job.aasm.states({:permitted => true}, guard_parameter).map(&:name)
|
||||
```
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue