1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00

Give example of using reject in readme

This commit is contained in:
dubroe 2015-10-19 16:05:06 -04:00
parent c01b88e598
commit 09c6150a87

View file

@ -704,6 +704,8 @@ job.aasm.states(:permitted => true).map(&:name)
# show all possible (triggerable) events (allowed by transitions)
job.aasm.events.map(&:name)
=> [:sleep]
job.aasm.events(:reject => :sleep).map(&:name)
=> []
# list states for select
Job.aasm.states_for_select