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

use the short mapping

This commit is contained in:
Thorsten Böttger 2014-03-20 21:18:54 +01:00
parent 3da4549aaa
commit aaf778781d

View file

@ -431,13 +431,13 @@ Given the `Job` class from above:
```ruby
job = Job.new
job.aasm.states.map { | state | state.name }
job.aasm.states.map(&:name)
=> [:sleeping, :running, :cleaning]
job.aasm.states(:permissible => true).map { | state | state.name }
job.aasm.states(:permissible => true).map(&:name)
=> [:running]
job.run
job.aasm.states(:permissible => true).map { | state | state.name }
job.aasm.states(:permissible => true).map(&:name)
=> [:cleaning, :sleeping]
job.aasm.events