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:
parent
3da4549aaa
commit
aaf778781d
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue