1
0
Fork 0
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:
Anil 2015-10-01 20:20:53 +05:30
parent 64a133407d
commit 13d42d02ba

View file

@ -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"]]
```