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:
parent
c01b88e598
commit
09c6150a87
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue