1
0
Fork 0
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:
Anil Kumar Maurya 2016-08-01 20:15:39 +05:30 committed by GitHub
parent d9420797e6
commit 86052bf8de

View file

@ -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)
```