mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
Merge pull request #115 from danlo/master
Updated README.md to refect actual code necessary to get states
This commit is contained in:
commit
3da4549aaa
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
|
||||
job.aasm.states.map { | state | state.name }
|
||||
=> [:sleeping, :running, :cleaning]
|
||||
|
||||
job.aasm.states(:permissible => true)
|
||||
job.aasm.states(:permissible => true).map { | state | state.name }
|
||||
=> [:running]
|
||||
job.run
|
||||
job.aasm.states(:permissible => true)
|
||||
job.aasm.states(:permissible => true).map { | state | state.name }
|
||||
=> [:cleaning, :sleeping]
|
||||
|
||||
job.aasm.events
|
||||
|
|
Loading…
Reference in a new issue